Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientX ¶
func (*ClientX) Watch ¶
func (x *ClientX) Watch(ctx context.Context, key string, callback WatchCallback, opts ...WithWatchOptions) error
Watch 监听指定 key 这是一个同步的函数,会阻塞直到 ctx 超时或者出错
type TargetNode ¶
type WatchCallback ¶
type WatchCallback interface { BatchSet([]TargetNode) BatchDelete([]string) Reset() }
type WithLeaseOptions ¶
type WithLeaseOptions func(*leaseOptions)
func WithLeaseTTL ¶
func WithLeaseTTL(ttl int64) WithLeaseOptions
type WithWatchOptions ¶
type WithWatchOptions func(*watchOptions)
func WithWatchSessionTTL ¶
func WithWatchSessionTTL(ttl int) WithWatchOptions
WithWatchSessionTTL 探活指针探活间隔(秒)
Click to show internal directories.
Click to hide internal directories.