lock

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LockScheduledDeploy added in v0.86.0

func LockScheduledDeploy()

LockScheduledDeploy acquires the global scheduler/deployment lock. While held, scheduled runs and deployments are mutually exclusive.

func UnlockScheduledDeploy added in v0.86.0

func UnlockScheduledDeploy()

UnlockScheduledDeploy releases the scheduler/deployment lock.

Types

type RepoLock

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

RepoLock represents a lock for a specific repository.

func GetRepoLock

func GetRepoLock(repoName string) *RepoLock

GetRepoLock retrieves or creates a RepoLock for the given repoName.

func (*RepoLock) Holder

func (l *RepoLock) Holder() string

Holder returns the jobID of the current lock holder.

func (*RepoLock) Lock

func (l *RepoLock) Lock()

Lock acquires the lock, blocking until it is available.

func (*RepoLock) TryLock

func (l *RepoLock) TryLock(jobID string) bool

TryLock attempts to acquire the lock for the given jobID. It returns true if the lock was successfully acquired.

func (*RepoLock) Unlock

func (l *RepoLock) Unlock()

Unlock releases the lock.

Jump to

Keyboard shortcuts

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