Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyLocked = errors.New("already locked") ErrNotLocked = errors.New("not locked") )
Functions ¶
This section is empty.
Types ¶
type MutexFactory ¶
func New ¶
func New(provider Provider, defaultOpts ...Option) MutexFactory
type Option ¶
type Option interface {
Apply(*mutex)
}
Option is an option for tweaking Mutex.
func WithLockLifetime ¶
WithLockLifetime returns an option that configures Mutex.lifetime.
func WithNamespace ¶
WithNamespace returns an option that configures Mutex.ns.
Click to show internal directories.
Click to hide internal directories.