Help us shape the future of Go! Take the 2026 Go Developer Survey

lock

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key added in v0.1.1

func Key(key string) (string, error)

Key validates a lock key and gives it the leading slash every backend indexes on.

Types

type DistributedLock

type DistributedLock interface {
	Lock(ctx context.Context) (context.Context, error)
	Unlock(ctx context.Context) error
}

DistributedLock is a mutual exclusion lock shared by every core instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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