Documentation ¶
Index ¶
- Variables
- func IsValidAsKeyPath(s string) bool
- func NewClient(ctx context.Context, cfg *conf.Conf, etcdClientArgs *etcdutil.ClientArgs) (err error)
- type Client
- func (c *Client) DelLock(key string) error
- func (c *Client) DelRunnable(key string, opts ...client.OpOption) (*client.DeleteResponse, error)
- func (c *Client) Delete(key string, opts ...client.OpOption) (*client.DeleteResponse, error)
- func (c *Client) Get(key string, opts ...client.OpOption) (*client.GetResponse, error)
- func (c *Client) GetLock(key string, id client.LeaseID) (bool, error)
- func (c *Client) Grant(ttl int64) (*client.LeaseGrantResponse, error)
- func (c *Client) IsRunnable(key string, opts ...client.OpOption) bool
- func (c *Client) KeepAliveOnce(id client.LeaseID) (*client.LeaseKeepAliveResponse, error)
- func (c *Client) NewRunnable(key, val string, opts ...client.OpOption) (*client.PutResponse, error)
- func (c *Client) Post(key, val string, opts ...client.OpOption) (*client.PutResponse, error)
- func (c *Client) Put(key, val string, opts ...client.OpOption) (*client.PutResponse, error)
- func (c *Client) PutWithModRev(key, val string, rev int64) (*client.PutResponse, error)
- func (c *Client) Watch(key string, opts ...client.OpOption) client.WatchChan
- func (c *Client) WatchByCtx(ctx context.Context, key string, opts ...client.OpOption) client.WatchChan
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyExists = errors.New("key already exists")
ErrKeyExists
Functions ¶
Types ¶
type Client ¶
Client - etcd client
var ( //DefalutClient etcd client DefalutClient *Client )
func (*Client) DelRunnable ¶
DelRunnable
func (*Client) Grant ¶
func (c *Client) Grant(ttl int64) (*client.LeaseGrantResponse, error)
Grant etcd v3
func (*Client) IsRunnable ¶
IsRunnable
func (*Client) KeepAliveOnce ¶
KeepAliveOnce etcd v3
func (*Client) NewRunnable ¶
NewRunnable
func (*Client) Post ¶
Post attempts to create the given key, only succeeding if the key did not yet exist.
func (*Client) PutWithModRev ¶
PutWithModRev
Click to show internal directories.
Click to hide internal directories.