executor

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 11 Imported by: ? modules, 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

Overview

Package executor applies configuration changes to the running engine via diff-and-apply, minimizing disruption to active data flows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfig

func ApplyConfig(cfg *core.Config, force bool) error

ApplyConfig applies configuration diffs to the running engine.

func CurrentConfig

func CurrentConfig() *core.Config

CurrentConfig returns the current active configuration.

func Init

func Init(e core.Engine, initialCfg *core.Config, path string)

Init initializes the executor with the active engine, config, and file path.

func ParseWithBytes

func ParseWithBytes(buf []byte) (*core.Config, error)

ParseWithBytes parses configuration from YAML bytes WITHOUT validating. See ParseWithPath for why validation is deferred.

func ParseWithPath

func ParseWithPath(path string) (*core.Config, error)

ParseWithPath parses configuration from a file path WITHOUT validating. The executor's Reload path calls this so it can run the sentinel-merge (config.MergeSentinels) before validation — validate rejects the "***" sentinel for short secret fields, so the merge must restore real values first.

func Patch

func Patch(patch map[string]any) error

func RawConfigYAML added in v0.0.4

func RawConfigYAML() (string, error)

RawConfigYAML returns the full active configuration as YAML text with every secret value redacted to the SentinelValue ("***"). Used by GET /configs/raw so the Dashboard's Config Center can populate its editor with the server's real config without exposing credentials to the operator's browser.

The redacted config is safe to round-trip: when submitted back via PUT /configs, the executor's sentinel-merge (in Reload) restores the real secret values before ApplyConfig persists the config.

func Reload

func Reload(path, payload string) error

Reload executes a full configuration reload either from a file or payload string.

func Validate added in v0.0.4

func Validate(payload string) (warnings []string, err error)

Validate performs a dry-run validation of a config payload WITHOUT applying it. It parses the payload, runs the sentinel-merge against the live config (so "***" placeholders for unchanged secrets are restored to real values), THEN validates — producing a faithful prediction of whether Reload would accept the config. Used by POST /configs/validate so the Dashboard can surface errors before the operator commits a PUT /configs.

The merge is essential here: validate enforces api.secret minimum length and would reject the 3-char "***" sentinel before the real value is restored. Merging first makes the dry-run match the real Reload outcome (which also merges before validating).

Types

This section is empty.

Jump to

Keyboard shortcuts

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