Versions in this module Expand all Collapse all v0 v0.0.1 Mar 8, 2018 Changes in this version + const DefaultValue + const Fail + const Success + type Client struct + Store Store + func New(machines []string, timeout int64, ttl int64, ctx context.Context) (Client, error) + func (c Client) Get(name string) (string, error) + func (c Client) Inspect(name string) Report + func (c Client) Lock(name, value string, quit <-chan bool) Report + func (c Client) Unlock(name string, quit chan<- bool) error + func (c Client) Watch(name string, valueChanges chan<- string, quit <-chan bool) error + type EtcdStore struct + EtcdClientv3 *clientv3.Client + Log log.Logger + TTL int64 + Version string + func (s EtcdStore) AcquireOrFreshenLock(ctx context.Context, name, value string) error + func (s EtcdStore) Delete(ctx context.Context, name string) error + func (s EtcdStore) Get(ctx context.Context, name string) (string, error) + type LockDenied struct + func (e LockDenied) Error() string + type LockNotFound struct + func (e LockNotFound) Error() string + type Report struct + Err error + Msg string + type Store interface + AcquireOrFreshenLock func(ctx context.Context, name, value string) error + Delete func(ctx context.Context, name string) error + Get func(ctx context.Context, name string) (string, error)