Documentation
¶
Overview ¶
Package config provides configuration schema, loading, and embedding for kubesnake.
kubesnake is designed to remain a single portable binary that can carry its configuration as it propagates through a cluster. This package defines the config schema and provides helpers for loading/embedding config into the current executable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbedConfigDataIntoExecutable ¶
EmbedConfigDataIntoExecutable embeds config bytes into the given executable path. The executable is rewritten to a temporary file in the same directory and atomically renamed into place.
func EmbedConfigFileIntoExecutable ¶
EmbedConfigFileIntoExecutable reads cfgPath, validates it as JSON, and embeds the config data into exePath.
func EmbedConfigFileIntoSelf ¶
EmbedConfigFileIntoSelf embeds the JSON config at cfgPath into the current executable, returning the resolved executable path.
Types ¶
type Config ¶
type Config struct {
E2E *E2EConfig `json:"e2e"`
}
Config is the top-level configuration schema. Keep this minimal and additive (backwards compatible) over time.
func LoadConfigFromFile ¶
LoadConfigFromFile reads and parses a JSON config file.
func LoadEmbeddedConfigFromExecutable ¶
LoadEmbeddedConfigFromExecutable loads and parses an embedded config from a specific executable path. If no embedded config exists, it returns (nil, nil).
func LoadEmbeddedConfigFromSelf ¶
LoadEmbeddedConfigFromSelf loads the embedded config from the current executable. If no embedded config exists, it returns (nil, nil).
func (*Config) E2EBeaconURL ¶
E2EBeaconURL returns the configured e2e beacon URL, if present.