exclusive_locks

package
v0.0.0-...-2206af0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RenewInteval     = 4 * time.Second
	SafeRenewInteval = 3 * time.Second
	InitLockInteval  = 1 * time.Second
	AdminLockName    = "admin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExclusiveLocker

type ExclusiveLocker struct {
	// contains filtered or unexported fields
}

func NewExclusiveLocker

func NewExclusiveLocker(masterClient *wdclient.MasterClient) *ExclusiveLocker

func (*ExclusiveLocker) GetToken

func (l *ExclusiveLocker) GetToken() (token int64, lockTsNs int64)

func (*ExclusiveLocker) IsLocking

func (l *ExclusiveLocker) IsLocking() bool

func (*ExclusiveLocker) ReleaseLock

func (l *ExclusiveLocker) ReleaseLock()

func (*ExclusiveLocker) RequestLock

func (l *ExclusiveLocker) RequestLock()

Jump to

Keyboard shortcuts

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