Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Locker ¶ added in v0.14.2
type Locker interface { /* Lock acquires a lock. The returned context will be cancelled when the lock is released. The following errors can occur: * ErrLockAlreadyHeld: it already had the lock * ErrLockAlreadyAcquired: the lock is already held by another lock */ Lock(context.Context) (context.Context, error) /* Unlock releases the lock, leading to the cancelling the context returned in Lock() The following errors can occur: * ErrLockNotHeld: releasing a lock that it was not previously acquired */ Unlock(context.Context) error // WaitForLock lock or wait until it locks or the context is cancelled. // The returned context will be cancelled when the lock is released. WaitForLock(context.Context) (context.Context, error) }
type WaitForUnlocker ¶ added in v0.14.2
type WaitLocker ¶ added in v0.25.0
type WaitLocker interface { Locker WaitForUnlocker }
Click to show internal directories.
Click to hide internal directories.