meta

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "ado"

Build metadata is set at compile time via -ldflags when available.

Variables

View Source
var (
	Version   = "0.0.0-dev"
	Commit    = "none"
	BuildTime = "unknown"
)

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Name      string `json:"name" yaml:"name"`
	Version   string `json:"version" yaml:"version"`
	Commit    string `json:"commit" yaml:"commit"`
	BuildTime string `json:"build_time" yaml:"build_time"`
	GoVersion string `json:"go_version" yaml:"go_version"`
	Platform  string `json:"platform" yaml:"platform"`
}

func CurrentBuildInfo

func CurrentBuildInfo() BuildInfo

type CPUInfo added in v1.4.0

type CPUInfo struct {
	Model        string  `json:"model" yaml:"model"`
	Vendor       string  `json:"vendor" yaml:"vendor"`
	Cores        int32   `json:"cores" yaml:"cores"`
	FrequencyMHz float64 `json:"frequency_mhz" yaml:"frequency_mhz"`
}

CPUInfo represents CPU information.

type EnvInfo

type EnvInfo struct {
	ConfigPath    string            `json:"config_path" yaml:"config_path"`
	ConfigSources []string          `json:"config_sources" yaml:"config_sources"`
	HomeDir       string            `json:"home_dir" yaml:"home_dir"`
	CacheDir      string            `json:"cache_dir" yaml:"cache_dir"`
	Env           map[string]string `json:"env" yaml:"env"`
}

func CollectEnvInfo

func CollectEnvInfo(explicitConfig string) EnvInfo

type GPUInfo added in v1.4.0

type GPUInfo struct {
	Vendor string `json:"vendor" yaml:"vendor"`
	Model  string `json:"model" yaml:"model"`
	Type   string `json:"type" yaml:"type"` // integrated, discrete, unknown
}

GPUInfo represents GPU information.

type MemoryInfo added in v1.4.0

type MemoryInfo struct {
	TotalMB     uint64  `json:"total_mb" yaml:"total_mb"`
	AvailableMB uint64  `json:"available_mb" yaml:"available_mb"`
	UsedMB      uint64  `json:"used_mb" yaml:"used_mb"`
	UsedPercent float64 `json:"used_percent" yaml:"used_percent"`
	SwapTotalMB uint64  `json:"swap_total_mb" yaml:"swap_total_mb"`
	SwapUsedMB  uint64  `json:"swap_used_mb" yaml:"swap_used_mb"`
}

MemoryInfo represents memory and swap information.

type NPUInfo added in v1.4.0

type NPUInfo struct {
	Detected        bool   `json:"detected" yaml:"detected"`
	Type            string `json:"type" yaml:"type"`                         // Apple Neural Engine, Intel AI Boost, AMD Ryzen AI, unknown
	InferenceMethod string `json:"inference_method" yaml:"inference_method"` // cpu_model, platform_api, unknown
}

NPUInfo represents NPU (Neural Processing Unit) information.

type StorageInfo added in v1.4.0

type StorageInfo struct {
	Device      string  `json:"device" yaml:"device"`
	Mountpoint  string  `json:"mountpoint" yaml:"mountpoint"`
	Filesystem  string  `json:"filesystem" yaml:"filesystem"`
	TotalMB     uint64  `json:"total_mb" yaml:"total_mb"`
	UsedMB      uint64  `json:"used_mb" yaml:"used_mb"`
	FreeMB      uint64  `json:"free_mb" yaml:"free_mb"`
	UsedPercent float64 `json:"used_percent" yaml:"used_percent"`
}

StorageInfo represents storage volume information.

type SystemInfo added in v1.4.0

type SystemInfo struct {
	OS           string        `json:"os" yaml:"os"`
	Platform     string        `json:"platform" yaml:"platform"`
	Kernel       string        `json:"kernel" yaml:"kernel"`
	Architecture string        `json:"architecture" yaml:"architecture"`
	CPU          CPUInfo       `json:"cpu" yaml:"cpu"`
	Memory       MemoryInfo    `json:"memory" yaml:"memory"`
	Storage      []StorageInfo `json:"storage" yaml:"storage"`
	GPU          []GPUInfo     `json:"gpu" yaml:"gpu"`
	NPU          *NPUInfo      `json:"npu" yaml:"npu"`
}

SystemInfo represents comprehensive system diagnostic information.

func CollectSystemInfo added in v1.4.0

func CollectSystemInfo(ctx context.Context) SystemInfo

CollectSystemInfo gathers system diagnostic information. Returns partial information if some detection fails (graceful degradation). Detection failures are logged via slog at debug level. Never returns an error (diagnostic tool, not validation tool).

Zero values indicate "unknown" or "not detected": - Cores: 0 = unknown - FrequencyMHz: 0.0 = unknown (common on Apple Silicon) - TotalMB/UsedMB: 0 = detection failed

Jump to

Keyboard shortcuts

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