Documentation ¶
Index ¶
- Constants
- Variables
- func NewClient(cfg etcdadpt.Config) etcdadpt.Client
- func TracingBegin(ctx context.Context, operationName string, op etcdadpt.OpOptions) interface{}
- func TracingEnd(span interface{}, 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 ...etcdadpt.OpOption) (*etcdadpt.Response, error)
- func (c *Client) Err() <-chan error
- func (c *Client) GetEndpointStatus(ctx context.Context, ep string) (*clientv3.StatusResponse, error)
- func (c *Client) HealthCheck()
- func (c *Client) HealthCheckLoop(ctx context.Context)
- func (c *Client) Initialize() (err error)
- func (c *Client) LargeRequestPaging(ctx context.Context, op etcdadpt.OpOptions) (*clientv3.GetResponse, 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) ListCluster(ctx context.Context) (etcdadpt.Clusters, error)
- func (c *Client) ReOpen() error
- func (c *Client) Ready() <-chan struct{}
- func (c *Client) Status(ctx context.Context) (*etcdadpt.StatusResponse, error)
- func (c *Client) SyncMembers(ctx context.Context) error
- func (c *Client) Txn(ctx context.Context, opts []etcdadpt.OpOptions) (*etcdadpt.Response, error)
- func (c *Client) TxnWithCmp(ctx context.Context, success []etcdadpt.OpOptions, cmps []etcdadpt.CmpOptions, ...) (*etcdadpt.Response, error)
- func (c *Client) Watch(ctx context.Context, opts ...etcdadpt.OpOption) (err error)
- func (c *Client) WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)
Constants ¶
View Source
const ( OperationCompact = "COMPACT" OperationTxn = "TXN" OperationLeaseGrant = "LEASE_GRANT" OperationLeaseRenew = "LEASE_RENEW" OperationLeaseRevoke = "LEASE_REVOKE" OperationSyncMembers = "SYNC" )
Variables ¶
View Source
var ErrGetLeaderFailed = errors.New("get leader failed")
View Source
var FirstEndpoint string
Functions ¶
func TracingBegin ¶
func TracingEnd ¶
func TracingEnd(span interface{}, err error)
Types ¶
type Client ¶
type Client struct { Cfg etcdadpt.Config Client *clientv3.Client Endpoints []string DialTimeout time.Duration AutoSyncInterval time.Duration // contains filtered or unexported fields }
func (*Client) GetEndpointStatus ¶
func (*Client) HealthCheck ¶
func (c *Client) HealthCheck()
func (*Client) HealthCheckLoop ¶
func (*Client) Initialize ¶
func (*Client) LargeRequestPaging ¶ added in v0.1.3
func (*Client) LeaseGrant ¶
func (*Client) LeaseRenew ¶
func (*Client) ListCluster ¶
func (*Client) TxnWithCmp ¶
func (*Client) WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.