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 *EtcdServiceConfig) *EtcdService
func (*EtcdService) WatchEvent ¶
func (es *EtcdService) WatchEvent(key string, cb func(ctx *zservice.Context, val []byte)) (cancelFunc context.CancelFunc)
监听事件,支持取消功能
type EtcdServiceConfig ¶
type EtcdServiceConfig struct { Addr string // ETCD 服务地址 OnStart func(*EtcdService) // 启动的回调 }
Click to show internal directories.
Click to hide internal directories.