Documentation
¶
Overview ¶
Package config loads and validates cliwrap YAML configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandEnv ¶
ExpandEnv replaces ${VAR} and ${VAR:-default} occurrences in s. An unresolved ${VAR} without a default returns an error.
func ParseByteSize ¶
ParseByteSize parses strings like "256MiB" or "1GB" into a byte count. Supported suffixes:
B, KB, MB, GB, TB (powers of 1000) KiB, MiB, GiB, TiB (powers of 1024)
An unsuffixed integer is interpreted as bytes. Whitespace between the number and suffix is allowed.
Types ¶
type Config ¶
type Config struct {
Version string
Runtime RuntimeConfig
SystemBudget SystemBudgetConfig
SandboxProviders []string
Groups []ProcessGroup
}
Config is the canonical in-memory representation of a loaded YAML file.
type ProcessGroup ¶
ProcessGroup is a named collection of process specs.
type RuntimeConfig ¶
type RuntimeConfig struct {
Dir string
Debug string // off | info | verbose | trace
AgentPath string
// LogRingBufferBytes overrides the per-(process, stream) log ring
// buffer capacity. Zero means use cliwrap.DefaultLogRingBufferBytes
// (1 MiB). YAML key: runtime.log_ring_buffer_bytes.
LogRingBufferBytes int
// LogFileDir enables file-backed log persistence under the given
// directory. Empty means in-memory only (default).
// YAML key: runtime.log_file_dir.
LogFileDir string
// LogFileMaxSize overrides the per-rotator size cap (bytes) when
// LogFileDir is set. Zero falls back to FileRotator default (64 MiB).
// YAML key: runtime.log_file_max_size.
LogFileMaxSize int64
// LogFileMaxFiles overrides the per-rotator retention count.
// Zero falls back to FileRotator default (7).
// YAML key: runtime.log_file_max_files.
LogFileMaxFiles int
}
RuntimeConfig mirrors the "runtime" YAML block.
type SystemBudgetConfig ¶
SystemBudgetConfig mirrors the "system_budget" YAML block.
Click to show internal directories.
Click to hide internal directories.