Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decision ¶
type Decision int
Decision is the outcome of evaluating a Policy against current cache state.
const ( DecisionFetch Decision = iota DecisionUseCurrent DecisionUsePinned // DecisionUseTag is the outcome of resolving readproof://ns/path@<tag>. It // is never produced by Evaluate: a tag ref bypasses policy entirely (the // caller asked for one exact snapshot), so the resolver sets it directly. DecisionUseTag )
type Policy ¶
type Policy struct {
Strategy Strategy
// MaxAge applies only to StrategyAllowStale. Zero means no TTL (never
// refresh once a snapshot exists).
MaxAge time.Duration
// PinnedSnapshotID applies only to StrategyPinned.
PinnedSnapshotID string
}
Policy controls how a Resource's freshness is enforced during resolution.
Click to show internal directories.
Click to hide internal directories.