Provide passive per-source resource contexts

This commit is contained in:
2026-09-29 18:08:27 +00:00
parent 5a77728a81
commit 36362ee6af
16 changed files with 752 additions and 13 deletions

View File

@@ -72,6 +72,12 @@ func (r *Resolution) Source(id string) (SourceInfo, bool) {
return r.activeState().input.source(id)
}
// SourceContext returns a passive context during the active resolution
// callback. Retaining the callback context after return is unsupported.
func (r *Resolution) SourceContext(id string) (ResourceContext, bool) {
return r.activeState().input.sourceContext(id)
}
// Record declares the intent for a resolver mutation. A container path covers
// mutations to its descendants.
func (r *Resolution) Record(path Path, kind ChangeKind, reason string, dependencies ...Path) {