containerslot

package
v0.135.13 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: BSD-2-Clause Imports: 7 Imported by: 0

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).

Jump to

Keyboard shortcuts

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