Documentation
¶
Overview ¶
Package chainexec executes ConfigHub FunctionChain and validator groups against config data. It's the shared core consumed by `installer render` (after template resolution) and by `installer transformer` (which receives already-resolved groups from a KRM ResourceList functionConfig). Template resolution itself lives in internal/render — it depends on installer state that's irrelevant to the kustomize-side caller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatValidatorFailures ¶
func FormatValidatorFailures(failures []ValidatorFailure) string
FormatValidatorFailures renders a list of failures as a multi-line error message suitable for the operator. Empty slice → empty string.
func ParseFunctionArguments ¶
func ParseFunctionArguments(args []string) ([]fapi.FunctionArgument, error)
ParseFunctionArguments converts cub-CLI-shaped arg strings into the FunctionArgument form the executor expects. An arg of the form `--name=value` becomes a named argument with ParameterName=name; a bare arg becomes a positional argument with Value=<arg>.
Mirrors the parser in public/cmd/cub/function_do.go so chain templates can use the same `--liveness-path=/internal/ok` style as worker_install.go.
Types ¶
type ValidatorFailure ¶
ValidatorFailure is one failing validation result. Returned by RunValidators; formatted into operator-facing error messages via FormatValidatorFailures.
func RunValidators ¶
func RunValidators(ctx context.Context, groups []api.FunctionGroup, data []byte) ([]ValidatorFailure, error)
RunValidators executes validator groups against data. Each group is invoked with StopOnError=false so every validator runs and the operator sees a complete report. Returns nil on full success.
Validators must be Validating functions (Mutating=false). Mutating functions in the validators list are rejected before any invocation runs — the validators list is a contract, not a generic chain.