locker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// PreLock must be called prior to locking one or more public keys.
	// It obtains a locker-wide mutex, to ensure that only one goroutine
	// can be locking or unlocking groups of public keys at a time.
	PreLock()
	// PostLock must be called after locking one or more public keys.
	// It frees the locker-wide mutex obtained by PreLock().
	PostLock()
	// Lock acquires a lock for a given public key.
	// If more than one lock is being acquired in a batch, ensure that
	// PreLock() is called beforehand and PostLock() afterwards.
	Lock(key [48]byte)
	// Unlock frees a lock for a given public key.
	Unlock(key [48]byte)
}

Service provides the features and functions for a global account locker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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