Documentation ¶
Index ¶
- type EtcdClient
- func (cli *EtcdClient) GetClient() *clientv3.Client
- func (cli *EtcdClient) Locker(ctx context.Context, lockKey string, leaseTtl int64) (bool, error)
- func (cli *EtcdClient) SetNx(ctx context.Context, key, value string, ops ...clientv3.OpOption) (int, error)
- func (cli *EtcdClient) SvcDiscover(ctx context.Context, prefixKey string, whenGet func(string, string), ...) error
- func (cli *EtcdClient) SvcRegister(ctx context.Context, prefixKey string, value string, leaseTtl int64) error
- func (cli *EtcdClient) Unlocker(ctx context.Context, lockKey string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdClient ¶
func NewEtcdClient ¶
func NewEtcdClient(config clientv3.Config) (*EtcdClient, error)
func (*EtcdClient) GetClient ¶ added in v1.0.1
func (cli *EtcdClient) GetClient() *clientv3.Client
func (*EtcdClient) SvcDiscover ¶
func (*EtcdClient) SvcRegister ¶
Click to show internal directories.
Click to hide internal directories.