kubernetesk8s.io/kubernetes/pkg/util/keymutex Index | Files

package keymutex

import "k8s.io/kubernetes/pkg/util/keymutex"

Index

Types

type KeyMutex

type KeyMutex interface {
	// Acquires a lock associated with the specified ID, creates the lock if one doesn't already exist.
	LockKey(id string)

	// Releases the lock associated with the specified ID.
	// Returns an error if the specified ID doesn't exist.
	UnlockKey(id string) error
}

KeyMutex is a thread-safe interface for acquiring locks on arbitrary strings.

func NewKeyMutex

func NewKeyMutex() KeyMutex

Returns a new instance of a key mutex.

Source Files

keymutex.go

Version
v1.4.1-beta.2
Published
Oct 8, 2016
Platform
js/wasm
Imports
3 packages
Last checked
13 seconds ago

Tools for package owners.