kmutex

package module
v0.0.0-...-2eaff63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMutex

type KMutex struct {
	// contains filtered or unexported fields
}

KMutex allows to lock by key.

func NewKMutex

func NewKMutex() *KMutex

NewKMutex returns multiple key locker.

func (*KMutex) Lock

func (km *KMutex) Lock(ctx context.Context, key string) error

Lock locks by key and allows to use context to cancel.

func (*KMutex) Unlock

func (km *KMutex) Unlock(key string)

Unlock unlocks the key.

Directories

Path Synopsis
examples
lockclient command
lockserver command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL