Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface {
// Analyze returns the subset of inFlight batches that conflict with
// batch, each paired with the type of conflict detected. An empty
// result means batch does not conflict with any in-flight batch.
//
// Callers should not include batch itself in inFlight; terminal batches
// should be filtered out before calling. A non-nil error indicates the
// analysis itself failed (infrastructure issue) and should be treated as
// retryable by the caller.
Analyze(ctx context.Context, batch entity.Batch, inFlight []entity.Batch) ([]Conflict, error)
}
Analyzer detects conflicts between a candidate batch and the batches already in flight, so the speculation layer can decide which batches can safely advance in parallel.
type Conflict ¶
type Conflict struct {
// BatchID is the ID of the in-flight batch that conflicts with the
// analyzed batch.
BatchID string
// Type classifies the conflict. A single (analyzed, in-flight) pair may
// be reported with multiple Conflict entries when different conflict
// types apply.
Type ConflictType
}
Conflict reports a single conflict between the analyzed batch and one of the in-flight batches.
type ConflictType ¶
type ConflictType string
ConflictType classifies why two batches are considered to conflict. New values may be added as more sophisticated analyzers are introduced.
const ( // ConflictTypeUnknown is the unreachable zero value, set by default when // the structure is initialized. It should never be seen in the system. ConflictTypeUnknown ConflictType = "" // ConflictTypeConservative means the analyzer treated the batches as // conflicting because it could not prove otherwise, without identifying a // specific reason. Used by conservative analyzers that serialize // everything by default. ConflictTypeConservative ConflictType = "conservative" // ConflictTypeTargetOverlap means the two batches modify one or more of // the same build targets and may therefore interfere with each other. ConflictTypeTargetOverlap ConflictType = "target_overlap" )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package all provides a conflict.Analyzer that pessimistically reports a conflict against every in-flight batch.
|
Package all provides a conflict.Analyzer that pessimistically reports a conflict against every in-flight batch. |
|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
|
Package none provides a conflict.Analyzer that never reports a conflict.
|
Package none provides a conflict.Analyzer that never reports a conflict. |
Click to show internal directories.
Click to hide internal directories.