Documentation
¶
Index ¶
- type InputPatch
- type Metadata
- type Part
- type PatchView
- type PhaseView
- type PlanEntry
- type PlanGroup
- type PlanPatch
- type PlanRoot
- func (p *PlanRoot) ContainsTarget(owner any, namespace, name, apiVersion, kind string) (bool, error)
- func (p *PlanRoot) ExactEntry(owner any, group, entry string, root *Root, rootOwner any) (bool, error)
- func (p *PlanRoot) ExactGroup(owner any, group string, root *Root, rootOwner any) (bool, error)
- func (p *PlanRoot) Groups(owner any) ([]PlanGroup, error)
- func (p *PlanRoot) Replace(owner, nextOwner any, group string, root *Root, rootOwner any) (*PlanRoot, error)
- func (p *PlanRoot) ReplaceEntry(owner, nextOwner any, group, entry string, root *Root, rootOwner any) (*PlanRoot, error)
- func (p *PlanRoot) TargetCount(owner any) (int, error)
- func (p *PlanRoot) Validate(owner any) error
- func (p *PlanRoot) ValidateLineage(owner any, namespace, name, apiVersion, kind, uid, resourceVersion string, ...) error
- func (p *PlanRoot) VisitChangedTargets(owner any, previous *PlanRoot, previousOwner any, visit func(Metadata) error) error
- func (p *PlanRoot) VisitGroups(owner any, visit func(PlanGroup) error) error
- func (p *PlanRoot) VisitTargetPatches(owner any, target *Metadata, visit func(PlanPatch) error) error
- type Root
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputPatch ¶
type InputPatch struct {
Namespace string
Name string
APIVersion string
Kind string
UID string
ResourceVersion string
ListOwnership string
Variants map[string]map[string]any
SourceTemplate string
SourceLine int
}
InputPatch is detached by New before it becomes cached state.
type Metadata ¶
type Metadata struct {
Namespace string
Name string
APIVersion string
Kind string
UID string
ResourceVersion string
ListOwnership string
SourceTemplate string
SourceLine int
}
Metadata is a detached immutable patch descriptor.
type PatchView ¶
type PatchView struct {
// contains filtered or unexported fields
}
PatchView is an authenticated read-only reference into a Root.
type PhaseView ¶
type PhaseView struct {
// contains filtered or unexported fields
}
PhaseView is an authenticated read-only reference into a Root.
func (PhaseView) Materialize ¶
Materialize returns a detached status object.
type PlanRoot ¶
type PlanRoot struct {
// contains filtered or unexported fields
}
PlanRoot is an immutable exact group, phase-owner, and lineage index.
func NewPlanFromEntries ¶
NewPlanFromEntries returns a plan built atomically from exact ordered entries.
func (*PlanRoot) ContainsTarget ¶
func (p *PlanRoot) ContainsTarget(owner any, namespace, name, apiVersion, kind string) (bool, error)
ContainsTarget reports whether a target identity is present in the plan.
func (*PlanRoot) ExactEntry ¶
func (p *PlanRoot) ExactEntry( owner any, group, entry string, root *Root, rootOwner any, ) (bool, error)
ExactEntry reports whether an ordered group entry already points at root with the exact owner.
func (*PlanRoot) ExactGroup ¶
ExactGroup reports whether group already points at root with the exact owner.
func (*PlanRoot) Replace ¶
func (p *PlanRoot) Replace( owner, nextOwner any, group string, root *Root, rootOwner any, ) (*PlanRoot, error)
Replace returns a fresh plan root after atomically replacing one group.
func (*PlanRoot) ReplaceEntry ¶
func (p *PlanRoot) ReplaceEntry( owner, nextOwner any, group, entry string, root *Root, rootOwner any, ) (*PlanRoot, error)
ReplaceEntry returns a fresh plan root after atomically replacing one ordered group entry.
func (*PlanRoot) TargetCount ¶
TargetCount returns the number of unique target resources.
func (*PlanRoot) ValidateLineage ¶
func (p *PlanRoot) ValidateLineage( owner any, namespace, name, apiVersion, kind, uid, resourceVersion string, listOwnership ...string, ) error
ValidateLineage verifies that a direct patch can be overlaid by the plan.
func (*PlanRoot) VisitChangedTargets ¶
func (p *PlanRoot) VisitChangedTargets(owner any, previous *PlanRoot, previousOwner any, visit func(Metadata) error) error
VisitChangedTargets reports changed contributions, including removed targets.
func (*PlanRoot) VisitGroups ¶
VisitGroups visits exact group roots in lexical group order.
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
Root owns a projection payload that callers cannot mutate through safe Go.
func New ¶
func New(owner any, calls []InputPatch) (*Root, error)
New detaches patches into an opaque root bound to owner.
func (*Root) PatchCount ¶
PatchCount returns the number of projected patch records.