Documentation
¶
Overview ¶
Package executor applies configuration changes to the running engine via diff-and-apply, minimizing disruption to active data flows.
Index ¶
- func ApplyConfig(cfg *core.Config, force bool) error
- func CurrentConfig() *core.Config
- func Init(e core.Engine, initialCfg *core.Config, path string)
- func ParseWithBytes(buf []byte) (*core.Config, error)
- func ParseWithPath(path string) (*core.Config, error)
- func Patch(patch map[string]any) error
- func RawConfigYAML() (string, error)
- func Reload(path, payload string) error
- func Validate(payload string) (warnings []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyConfig ¶
ApplyConfig applies configuration diffs to the running engine.
func CurrentConfig ¶
CurrentConfig returns the current active configuration.
func ParseWithBytes ¶
ParseWithBytes parses configuration from YAML bytes WITHOUT validating. See ParseWithPath for why validation is deferred.
func ParseWithPath ¶
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 RawConfigYAML ¶ added in v0.0.4
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 Validate ¶ added in v0.0.4
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.