Documentation
¶
Index ¶
- Constants
- func ConfigList(rootDir string, key string) []string
- func ConfigMap(rootDir string, path ...string) (map[string]any, bool)
- func FirstBool(rootDir string, keys ...string) bool
- func FirstBoolDefault(rootDir string, fallback bool, keys ...string) bool
- func FirstList(rootDir string, keys ...string) []string
- func FirstNonEmpty(rootDir string, keys ...string) string
- func FirstNonEmptySecret(ctx context.Context, rootDir string, keys ...string) (string, error)
- func LoadConfigSnapshot(ctx context.Context, path string, maxBytes int64) (map[string]any, error)
- func LoadDotEnvSnapshot(ctx context.Context, rootDir string, maxBytes int64) (map[string]string, error)
- func Lookup(rootDir string, key string) (string, bool)
- func LookupBool(rootDir string, key string) (bool, bool)
- func LookupList(rootDir string, key string) []string
- func RegisterConfigFile(rootDir string, path string)
- func RegisterConfigSnapshot(rootDir string, snapshot map[string]any, dotenv map[string]string) func()
- func ResolveSecretRef(ctx context.Context, value string) (string, error)
Constants ¶
const SecretCommandTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ConfigList ¶
func ConfigMap ¶ added in v0.2.23
ConfigMap returns a shallow copy of a nested YAML map from the runtime config. It intentionally does not resolve secret references.
func FirstNonEmpty ¶
func FirstNonEmptySecret ¶ added in v0.1.1
func LoadConfigSnapshot ¶ added in v0.7.0
LoadConfigSnapshot opens one regular YAML file without following symlinks, enforces a streaming byte limit, and honors cancellation during read/parse.
func LoadDotEnvSnapshot ¶ added in v0.7.0
func LoadDotEnvSnapshot(ctx context.Context, rootDir string, maxBytes int64) (map[string]string, error)
LoadDotEnvSnapshot reads supported .envrc/.env assignments once. .envrc has precedence over .env, matching ordinary runtime lookup. Values remain raw; this function does not execute shell syntax or resolve secret references.
func LookupList ¶
func RegisterConfigFile ¶ added in v0.1.2
func RegisterConfigSnapshot ¶ added in v0.7.0
func RegisterConfigSnapshot(rootDir string, snapshot map[string]any, dotenv map[string]string) func()
RegisterConfigSnapshot temporarily installs already parsed dotenv and config maps. While installed, runtime lookups use process environment, then the frozen dotenv snapshot, then the frozen YAML snapshot without rereading files.
Types ¶
This section is empty.