Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LockStack ¶ added in v0.89.2
func LockStack(stackName string)
LockStack acquires the per-stack scheduler/deployment lock for stackName. While held, scheduled runs and deployments for this specific stack are mutually exclusive. Different stacks do not block each other. If stackName is empty the call is a no-op.
func StackKey ¶ added in v0.113.0
StackKey builds the per-stack lock key for a stack deployed to a Docker context. Stack names are only unique within a Docker context, so same-named stacks on different contexts must not block each other. The default context keeps the bare stack name so callers that only ever operate on it (the job scheduler and the certificate rotation watcher) stay mutually exclusive with its deployments.
func UnlockStack ¶ added in v0.89.2
func UnlockStack(stackName string)
UnlockStack releases the per-stack scheduler/deployment lock for stackName. If stackName is empty the call is a no-op.
Types ¶
type RepoLock ¶
type RepoLock struct {
// contains filtered or unexported fields
}
RepoLock represents a lock for a specific repository.
func GetRepoLock ¶
GetRepoLock retrieves or creates a RepoLock for the given repoName.
func (*RepoLock) Lock ¶
func (l *RepoLock) Lock()
Lock acquires the lock, blocking until it is available.
func (*RepoLock) LockContext ¶ added in v0.114.0
LockContext acquires the lock in waiter order or returns false when ctx is cancelled.
func (*RepoLock) TryLock ¶
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 and hands it to the next queued waiter, if any. It panics when the lock is not held, mirroring sync.Mutex misuse semantics: a stray Unlock would otherwise silently grant the lock to a waiter while the real holder is still running.