util

package
v4.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const FileLockDir = "/var/lock/vgmanager"

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLock

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

FileLock is a lock file used to ensure that only one instance of the operator is running, For example, when an old instance is still terminating its controllers, the new instance should not start. In this case the old instance will still hold the lock file and the new instance will wait for the lock to be released with WaitForLock.

func NewFileLock

func NewFileLock(name string) (*FileLock, error)

func (*FileLock) Close

func (l *FileLock) Close() error

func (*FileLock) TryLock

func (l *FileLock) TryLock() error

func (*FileLock) Unlock

func (l *FileLock) Unlock() error

func (*FileLock) WaitForLock

func (l *FileLock) WaitForLock(ctx context.Context) error

Jump to

Keyboard shortcuts

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