lock

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationAcquireTime = "openyurt.io/yurtctllock.acquire.time"
	AnnotationIsLocked    = "openyurt.io/yurtctllock.locked"

	LockTimeoutMin = 5
)

Variables

View Source
var (
	ErrAcquireLock error = errors.New("fail to acquire lock configmap/yurtctl-lock")
	ErrReleaseLock error = errors.New("fail to release lock configmap/yurtctl-lock")
)

Functions

func AcquireLock

func AcquireLock(cli kubeclientset.Interface) error

AcquireLock tries to acquire the lock lock configmap/yurtctl-lock

func DeleteLock added in v0.6.0

func DeleteLock(cli kubeclientset.Interface) error

DeleteLock should only be called when you've achieved the lock. It will delete the yurtctl-lock configmap.

func ReleaseLock

func ReleaseLock(cli kubeclientset.Interface) error

ReleaseLock releases the lock configmap/yurtctl-lock

Types

This section is empty.

Jump to

Keyboard shortcuts

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