Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HeartBeatTTL ¶
func HeartBeatTTL(ttl int) option
func NewLeaderFollower ¶
Types ¶
type ObserveRes ¶
type ObserveRes struct { Res clientv3.GetResponse EventType mvccpb.Event_EventType }
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func (*Watcher) Observe ¶
func (w *Watcher) Observe(ctx context.Context) chan ObserveRes
自定义封装监听重新选举与无法获取选取等事件
func (*Watcher) Watch ¶
func (w *Watcher) Watch(watchHandle func(res clientv3.GetResponse)) (string, error)
func (*Watcher) WatchWithEventType ¶
func (w *Watcher) WatchWithEventType(watchHandle func(res ObserveRes)) (string, error)
Click to show internal directories.
Click to hide internal directories.