Documentation
¶
Overview ¶
Package selection implements the candidate-selection seam (DESIGN §3.6, D10): the pluggable answer to "which SHA is the candidate?", decoupled from the pin mechanism itself (which is uniform across all ref styles). v1 ships only TrackRef; a future SemverWindow strategy is a non-breaking addition behind the same Strategy interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedRef = errors.New("unsupported ref style for candidate selection")
ErrUnsupportedRef marks ref styles v1 cannot sequence (semver).
Functions ¶
This section is empty.
Types ¶
type Strategy ¶
type Strategy interface {
// TrackingRef maps a GitRepository ref spec to the advertised ref name to observe.
TrackingRef(ref *sourcev1.GitRepositoryRef) (string, error)
// Candidate selects the candidate SHA from an advertisement listing
// (map of ref name → SHA, including peeled "<ref>^{}" entries).
Candidate(advertised map[string]string, trackingRef string) (sha string, ok bool)
}
Strategy answers "which SHA is the candidate?" (DESIGN §3.6).
Click to show internal directories.
Click to hide internal directories.