Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// Acquire blocks until a slot is available, then returns with the lock held
// and an idempotent release function.
Acquire(ctx context.Context) (release func(), err error)
// ReleaseAfterStart releases the lock once the named container is running
// (or after a 30s timeout). Spawns a goroutine; safe to call after Acquire.
ReleaseAfterStart(ctx context.Context, containerName string, release func())
}
Manager coordinates the per-host container concurrency limit.
func NewManager ¶
func NewManager( lock containerlock.ContainerLock, counter executor.ContainerCounter, checker executor.ContainerChecker, maxContainers int, pollInterval time.Duration, ) Manager
NewManager creates a Manager that controls container slot concurrency. lock may be nil (no locking); checker may be nil (skips release-after-start).
Click to show internal directories.
Click to hide internal directories.