etcd

package
v1.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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 NewRegistry() mgr.Instance

func TracingBegin

func TracingBegin(ctx context.Context, operationName string, op registry.PluginOp) tracing.Span

func TracingEnd

func TracingEnd(span tracing.Span, err error)

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) Close

func (c *Client) Close()

func (*Client) Compact

func (c *Client) Compact(ctx context.Context, reserve int64) error

func (*Client) Do

func (*Client) Err

func (c *Client) Err() <-chan error

func (*Client) HealthCheck

func (c *Client) HealthCheck()

func (*Client) Initialize

func (c *Client) Initialize() (err error)

func (*Client) LeaseGrant

func (c *Client) LeaseGrant(ctx context.Context, TTL int64) (int64, error)

func (*Client) LeaseRenew

func (c *Client) LeaseRenew(ctx context.Context, leaseID int64) (int64, error)

func (*Client) LeaseRevoke

func (c *Client) LeaseRevoke(ctx context.Context, leaseID int64) error

func (*Client) PutNoOverride

func (c *Client) PutNoOverride(ctx context.Context, opts ...registry.PluginOpOption) (bool, error)

func (*Client) ReOpen

func (c *Client) ReOpen() error

func (*Client) Ready

func (c *Client) Ready() <-chan struct{}

func (*Client) SyncMembers

func (c *Client) SyncMembers(ctx context.Context) error

func (*Client) Txn

func (*Client) TxnWithCmp

func (c *Client) TxnWithCmp(ctx context.Context, success []registry.PluginOp, cmps []registry.CompareOp, fail []registry.PluginOp) (*registry.PluginResponse, error)

func (*Client) Watch

func (c *Client) Watch(ctx context.Context, opts ...registry.PluginOpOption) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL