Documentation ¶ Index ¶ type MutexKV func NewMutexKV(key string) *MutexKV func (m *MutexKV) Lock(ctx context.Context, key string) func (m *MutexKV) Unlock(ctx context.Context, key string) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type MutexKV ¶ type MutexKV struct { // contains filtered or unexported fields } MutexKV is a simple key/value store for arbitrary mutexes. It can be used to serialize changes across arbitrary collaborators that share knowledge of the keys they must serialize on. func NewMutexKV ¶ func NewMutexKV(key string) *MutexKV Returns a properly initialized MutexKV. func (*MutexKV) Lock ¶ func (m *MutexKV) Lock(ctx context.Context, key string) Locks the mutex. func (*MutexKV) Unlock ¶ func (m *MutexKV) Unlock(ctx context.Context, key string) Unlock the mutex. Source Files ¶ View all Source files mutexkv.go Click to show internal directories. Click to hide internal directories.