kmutex

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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