Documentation ¶
Index ¶
- Variables
- func HandleEtcdError(err error)
- func NewClient(ctx context.Context, clientArgs *ClientArgs) (*v3.Client, error)
- func WaitEvents(c *clientv3.Client, key string, rev int64, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
- func WaitPrefixEvents(c *clientv3.Client, prefix string, rev int64, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
- func WatchPrefixEvents(c *clientv3.Client, prefix string, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
- type ClientArgs
- type EphemeralKV
- type Queue
- type RemoteKV
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyExists key already exists ErrKeyExists = errors.New("key already exists") // ErrWaitMismatch unexpected wait result ErrWaitMismatch = errors.New("unexpected wait result") // ErrTooManyClients too many clients ErrTooManyClients = errors.New("too many clients") // ErrNoWatcher no watcher channel ErrNoWatcher = errors.New("no watcher channel") //ErrNoEndpoints no etcd endpoint ErrNoEndpoints = errors.New("no etcd endpoint") )
Functions ¶
func WaitEvents ¶
func WaitEvents(c *clientv3.Client, key string, rev int64, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
WaitEvents waits on a key until it observes the given events and returns the final one.
func WaitPrefixEvents ¶
func WaitPrefixEvents(c *clientv3.Client, prefix string, rev int64, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
WaitPrefixEvents WaitPrefixEvents
func WatchPrefixEvents ¶
func WatchPrefixEvents(c *clientv3.Client, prefix string, evs []mvccpb.Event_EventType) (*clientv3.Event, error)
WatchPrefixEvents watch prefix
Types ¶
type ClientArgs ¶
type ClientArgs struct { Endpoints []string // args for clientv3.Config DialTimeout time.Duration // args for clientv3.Config AutoSyncInterval time.Duration // args for clientv3.Config CaFile string // args for clientv3.Config.TLS CertFile string // args for clientv3.Config.TLS KeyFile string // args for clientv3.Config.TLS }
ClientArgs etcd client arguments
type EphemeralKV ¶
type EphemeralKV struct{ RemoteKV }
EphemeralKV is a new key associated with a session lease
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue implements a multi-reader, multi-writer distributed queue.
Click to show internal directories.
Click to hide internal directories.