package
0.6.2
Repository: https://github.com/coreos/locksmith.git
Documentation: pkg.go.dev

# Functions

New returns a new lock with the provided arguments.
NewEtcdLockClient creates a new EtcdLockClient.

# Constants

SemaphorePrefix is the key in etcd where the semaphore will be stored.

# Variables

ErrExist is the error returned if a holder with the specified id is already holding the semaphore.
ErrNotExist is the error returned if there is no holder with the specified id holding the semaphore.

# Structs

EtcdLockClient is a wrapper around the etcd client that provides simple primitives to operate on the internal semaphore and holders structs through etcd.
Lock takes care of locking in generic clients.
Semaphore is a struct representation of the information held by the semaphore.

# Interfaces

KeysAPI is the minimum etcd client.KeysAPI interface EtcdLockClient needs to do its job.
LockClient is a generic interface for a lock.