planner

package
v1.0.2-pre.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type       ActionType
	Group      string
	Kind       string
	Name       string
	Namespace  string
	Original   *unstructured.Unstructured
	Updated    *unstructured.Unstructured
	Error      string
	SkipReason string
}

type ActionType

type ActionType string
const (
	Create    ActionType = "Create"
	Unchanged ActionType = "Unchanged"
	Delete    ActionType = "Delete"
	Update    ActionType = "Update"
	Skip      ActionType = "Skip"
	Error     ActionType = "Error"
)

type Applier

type Applier interface {
	Run(ctx context.Context, invInfo inventory.Info, objects object.UnstructuredSet, options apply.ApplierOptions) <-chan event.Event
}

type ClusterPlanner

type ClusterPlanner struct {
	// contains filtered or unexported fields
}

func NewClusterPlanner

func NewClusterPlanner(f util.Factory) (*ClusterPlanner, error)

NewClusterPlanner builds a ClusterPlanner using context.Background() for the underlying inventory-client cluster calls.

This signature is preserved for backward compatibility with external callers; it delegates to NewClusterPlannerWithContext. Prefer the context-aware constructor when you have a caller context so Ctrl-C and command-level timeouts can cancel inventory I/O.

func NewClusterPlannerWithContext

func NewClusterPlannerWithContext(ctx context.Context, f util.Factory) (*ClusterPlanner, error)

NewClusterPlannerWithContext is the context-aware variant of NewClusterPlanner. ctx is plumbed into the inventory wrapper so Apply / ApplyWithPrune on the underlying ResourceGroup honor caller cancellation (Ctrl-C, deadlines). A nil ctx is normalized to context.Background() by WrapInventoryObjWithContext.

func (*ClusterPlanner) BuildPlan

func (r *ClusterPlanner) BuildPlan(ctx context.Context, inv inventory.Info, objects []*unstructured.Unstructured, o Options) (*Plan, error)

type Options

type Options struct {
	ServerSideOptions common.ServerSideOptions
}

type Plan

type Plan struct {
	Actions []Action
}

type ResourceFetcher

type ResourceFetcher interface {
	FetchResource(ctx context.Context, id object.ObjMetadata) (*unstructured.Unstructured, bool, error)
}

func NewResourceFetcher

func NewResourceFetcher(f util.Factory) (ResourceFetcher, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL