Documentation ¶
Index ¶
- Variables
- func Del(key string, opts ...clientv3.OpOption) error
- func ExecAllTask(key string, ttl int, task func()) error
- func ExecOnceTask(key string, ttl int, task func()) error
- func Exit(key string, opts ...clientv3.OpOption)
- func Get(key string, opts ...clientv3.OpOption) ([]*mvccpb.KeyValue, error)
- func Init(etcdCfg *config.Etcd)
- func OnceTask1(key string, ttl int64, cb func()) error
- func Put(key, value string, opts ...clientv3.OpOption) error
- func PutWithLease(key, val string, ttl int64, opts ...clientv3.OpOption) error
- func Register(serverName, addr string, ttl int64) error
- func Unregister(serverName, addr string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *clientv3.Client
Functions ¶
func ExecAllTask ¶
ExecAllTask 基于分布式的全部执行任务
func ExecOnceTask ¶
ExecOnceTask 基于分布式的唯一执行任务
func Unregister ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.