Help us shape the future of Go! Take the 2026 Go Developer Survey

resolver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolutionResult

type ResolutionResult struct {
	Path     string
	Resolved bool
	Replaced interface{}
	Error    error
}

ResolutionResult represents the result of resolving a single expression.

type ResolutionSummary

type ResolutionSummary struct {
	TotalExpressions    int
	ResolvedExpressions int
	Results             []ResolutionResult
	Errors              []error
}

ResolutionSummary provides a summary of the resolution process.

type Resolver

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

Resolver handles the resolution of CEL expressions in Kubernetes resources.

func NewResolver

func NewResolver(resource map[string]interface{}, data map[string]interface{}) *Resolver

NewResolver creates a new Resolver instance.

func (*Resolver) Resolve

func (r *Resolver) Resolve(expressions []variable.FieldDescriptor) ResolutionSummary

Resolve processes all the given ExpressionFields and resolves their CEL expressions. It returns a ResolutionSummary containing information about the resolution process.

Omit sentinels are written into the resource like normal values during resolution. After all expressions are evaluated, a single cleanup pass removes any map keys or array elements that hold an omit sentinel.

func (*Resolver) UpsertValueAtPath

func (r *Resolver) UpsertValueAtPath(path string, value interface{}) error

UpsertValueAtPath sets a value in the resource using the fieldpath parser.

Jump to

Keyboard shortcuts

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