executionslot

package
v0.199.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: BSD-2-Clause Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 execution is running
	// (or after a 30s timeout). Spawns a goroutine; safe to call after Acquire.
	ReleaseAfterStart(ctx context.Context, executionID string, release func())
}

Manager coordinates the per-host execution-slot concurrency limit.

func NewManager

func NewManager(
	lock containerlock.ContainerLock,
	counter executor.ContainerCounter,
	checker executor.ExecutionChecker,
	maxExecutions int,
	pollInterval time.Duration,
) Manager

NewManager creates a Manager that controls execution 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