Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdService ¶
func NewEtcdService ¶
func NewEtcdService(c EtcdServiceOption) *EtcdService
func (*EtcdService) WatchEvent ¶
func (es *EtcdService) WatchEvent(key string, cb func(ctx *zservice.Context, val []byte)) (cancelFunc context.CancelFunc)
监听事件,支持取消功能
type EtcdServiceOption ¶ added in v0.2.0
type EtcdServiceOption struct { Name string // 显示在日志中的名称 Addr string // ETCD 服务地址 OnStart func(*EtcdService) // 启动的回调 }
Click to show internal directories.
Click to hide internal directories.