exclusive_locks

package
v0.0.0-...-935c85c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 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