package kmutex

import "github.com/containerd/containerd/pkg/kmutex"

Package kmutex provides synchronization primitives to lock/unlock resource by unique key.

Index

Types

type KeyedLocker

type KeyedLocker interface {
	Lock(ctx context.Context, key string) error
	Unlock(key string)
}

KeyedLocker is the interface for acquiring locks based on string.

func New

func New() KeyedLocker

func NewNoop

func NewNoop() KeyedLocker

Source Files

kmutex.go noop.go

Version
v1.7.7
Published
Oct 9, 2023
Platform
linux/amd64
Imports
4 packages
Last checked
3 minutes ago

Tools for package owners.