supervisorlock

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package supervisorlock provides exclusive locking for governator supervisors.

Index

Constants

This section is empty.

Variables

View Source
var ErrLockHeld = errors.New("supervisor lock already held")

ErrLockHeld indicates a supervisor lock is already held.

View Source
var ErrStaleLock = errors.New("stale supervisor lock")

ErrStaleLock indicates lock metadata references a non-running process.

Functions

func Held

func Held(repoRoot string, name string) (bool, error)

Held reports whether the named supervisor lock is currently held by a live process.

func IsStaleLockError added in v1.0.4

func IsStaleLockError(err error) bool

IsStaleLockError reports whether the provided error indicates stale lock metadata.

func Remove

func Remove(repoRoot string, name string) error

Remove deletes the named supervisor lock file if it exists.

Types

type Lock

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

Lock holds the acquired supervisor lock file handle.

func Acquire

func Acquire(repoRoot string, name string) (*Lock, error)

Acquire attempts to create and lock the named supervisor lock file for the repo.

func (*Lock) Release

func (lock *Lock) Release() error

Release unlocks and removes the supervisor lock file.

Jump to

Keyboard shortcuts

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