Documentation
¶
Overview ¶
Package allocator defines the budget-spending composition point used by the standard Speculator. An Allocator spends the queue's build budget over a candidate iterator. It is not a controller-facing extension — an alternate Speculator need not use or expose this split.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator interface {
// Allocate returns the build and cancel actions to take. It reconciles the
// candidate stream against the queue's current path sets by path ID: a
// candidate matching an in-flight path stays funded rather than starting a
// new attempt, and one matching a path whose build already finished is
// skipped — the generator enumerates the whole space, so suppressing
// finished paths is the Allocator's job.
//
// A cancelled or expired ctx aborts with its error and no actions.
Allocate(ctx context.Context, pathSets []entity.SpeculationPathSet, iter generator.Iterator) ([]entity.Speculation, error)
}
Allocator decides how to spend the queue's build budget over the generator's candidate stream, returning the build and cancel actions to take this run. How it rations the budget across new candidates and paths already in flight — and whether it preempts running builds — is the implementation's policy.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
|
Package sticky provides an allocator.Allocator that fills only free budget slots and leaves every in-flight build running — it never preempts.
|
Package sticky provides an allocator.Allocator that fills only free budget slots and leaves every in-flight build running — it never preempts. |
Click to show internal directories.
Click to hide internal directories.