Documentation ¶ Index ¶ type Lock func (l *Lock) Lock(ctx context.Context) (context.Context, error) func (l *Lock) Unlock(ctx context.Context) error func (l *Lock) WaitForLock(ctx context.Context) (context.Context, error) func (l *Lock) WaitForUnlock(ctx context.Context) error type Pool func NewPool(consulAddress string) (Pool, error) func (p Pool) NewLock(lockName string, expiry time.Duration) *Lock Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Lock ¶ type Lock struct { // contains filtered or unexported fields } func (*Lock) Lock ¶ func (l *Lock) Lock(ctx context.Context) (context.Context, error) func (*Lock) Unlock ¶ func (l *Lock) Unlock(ctx context.Context) error func (*Lock) WaitForLock ¶ func (l *Lock) WaitForLock(ctx context.Context) (context.Context, error) func (*Lock) WaitForUnlock ¶ func (l *Lock) WaitForUnlock(ctx context.Context) error type Pool ¶ type Pool struct { // contains filtered or unexported fields } func NewPool ¶ func NewPool(consulAddress string) (Pool, error) func (Pool) NewLock ¶ func (p Pool) NewLock(lockName string, expiry time.Duration) *Lock Source Files ¶ View all Source files consullock.go consulpool.go Click to show internal directories. Click to hide internal directories.