Documentation ¶
Index ¶
- Constants
- func NewRegistry() mgr.Instance
- func TracingBegin(ctx context.Context, operationName string, op registry.PluginOp) tracing.Span
- func TracingEnd(span tracing.Span, err error)
- type Client
- func (c *Client) Close()
- func (c *Client) Compact(ctx context.Context, reserve int64) error
- func (c *Client) Do(ctx context.Context, opts ...registry.PluginOpOption) (*registry.PluginResponse, error)
- func (c *Client) Err() <-chan error
- func (c *Client) HealthCheck()
- func (c *Client) Initialize() (err error)
- func (c *Client) LeaseGrant(ctx context.Context, TTL int64) (int64, error)
- func (c *Client) LeaseRenew(ctx context.Context, leaseID int64) (int64, error)
- func (c *Client) LeaseRevoke(ctx context.Context, leaseID int64) error
- func (c *Client) PutNoOverride(ctx context.Context, opts ...registry.PluginOpOption) (bool, error)
- func (c *Client) ReOpen() error
- func (c *Client) Ready() <-chan struct{}
- func (c *Client) SyncMembers(ctx context.Context) error
- func (c *Client) Txn(ctx context.Context, opts []registry.PluginOp) (*registry.PluginResponse, error)
- func (c *Client) TxnWithCmp(ctx context.Context, success []registry.PluginOp, cmps []registry.CompareOp, ...) (*registry.PluginResponse, error)
- func (c *Client) Watch(ctx context.Context, opts ...registry.PluginOpOption) (err error)
Constants ¶
View Source
const ( OperationCompact = "COMPACT" OperationTxn = "TXN" OperationLeaseGrant = "LEASE_GRANT" OperationLeaseRenew = "LEASE_RENEW" OperationLeaseRevoke = "LEASE_REVOKE" OperationSyncMembers = "SYNC" )
Variables ¶
This section is empty.
Functions ¶
func NewRegistry ¶
func TracingBegin ¶
func TracingEnd ¶
Types ¶
type Client ¶
type Client struct { Client *clientv3.Client Endpoints []string DialTimeout time.Duration TLSConfig *tls.Config AutoSyncInterval time.Duration // contains filtered or unexported fields }
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, opts ...registry.PluginOpOption) (*registry.PluginResponse, error)
func (*Client) HealthCheck ¶
func (c *Client) HealthCheck()
func (*Client) Initialize ¶
func (*Client) LeaseGrant ¶
func (*Client) LeaseRenew ¶
func (*Client) PutNoOverride ¶
func (*Client) TxnWithCmp ¶
Click to show internal directories.
Click to hide internal directories.