exclusive_locks

package
v0.0.0-...-5c6c1e7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 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
)

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, lockName string) *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(clientName string)

func (*ExclusiveLocker) SetMessage

func (l *ExclusiveLocker) SetMessage(message string)

Jump to

Keyboard shortcuts

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