locker

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock interface {
	// Releases releases a previously acquired lock.
	Release(ctx context.Context) error
}

Lock defines distributed lock object.

type Locker

type Locker interface {
	// AcquireLock acquires lockID distributed lock.
	AcquireLock(ctx context.Context, lockID string) (Lock, error)

	// Start initializes locker.
	Start(ctx context.Context) error

	// Stop releases all locker underlying resources.
	Stop(ctx context.Context) error
}

Locker defines distributed locking interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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