config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.5.0"

Version is the current version of herd. Version is the current version of herd.

Variables

This section is empty.

Functions

func GetTargetHomeDir added in v0.5.1

func GetTargetHomeDir() (string, error)

GetTargetHomeDir returns the home directory of the original user if running under sudo, falling back to the current user's home directory.

Types

type BinaryConfig added in v0.5.0

type BinaryConfig struct {
	FirecrackerPath string `yaml:"firecracker_path"`
	KernelImagePath string `yaml:"kernel_image_path"`
	GuestAgentPath  string `yaml:"guest_agent_path"`
}

type Config

type Config struct {
	Network   NetworkConfig   `yaml:"network"`
	Storage   StorageConfig   `yaml:"storage"`
	Resources ResourceConfig  `yaml:"resources"`
	Binaries  BinaryConfig    `yaml:"binaries"`
	Telemetry TelemetryConfig `yaml:"telemetry"`
}

Config is the strict daemon bootstrap contract. The daemon fails fast if any required field is missing or malformed.

func Load

func Load(path string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type NetworkConfig

type NetworkConfig struct {
	ControlBind string `yaml:"control_bind"`
	DataBind    string `yaml:"data_bind"`
}

type ResourceConfig

type ResourceConfig struct {
	MaxGlobalVMs      int     `yaml:"max_global_vms"`
	MaxGlobalMemoryMB int64   `yaml:"max_global_memory_mb"`
	CPULimitCores     float64 `yaml:"cpu_limit_cores"`
}

func (ResourceConfig) MemoryLimitBytes

func (r ResourceConfig) MemoryLimitBytes() int64

type StorageConfig added in v0.5.0

type StorageConfig struct {
	StateDir        string `yaml:"state_dir"`
	SnapshotterName string `yaml:"snapshotter_name"`
	Namespace       string `yaml:"namespace"`
}

type TelemetryConfig

type TelemetryConfig struct {
	LogFormat   string `yaml:"log_format"`
	MetricsPath string `yaml:"metrics_path"`
}

Jump to

Keyboard shortcuts

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