mutex

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosed = errors.New("mutex closed")

ErrClosed mutex already closed

Functions

This section is empty.

Types

type Interface

type Interface interface {
	NewWithTTL(ctx context.Context, key string, ttl time.Duration) (Mutex, error)
	New(ctx context.Context, key string) (Mutex, error)
}

Interface .

type Mutex

type Mutex interface {
	Lock(ctx context.Context) error
	Unlock(ctx context.Context) error
	Close() error
}

Mutex .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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