Documentation
¶
Overview ¶
Package hostos detects the operating system of an SSH-reachable host.
Index ¶
Constants ¶
const Script = `` /* 1051-byte string literal not displayed */
Script prints one KORTA_HOST line plus KORTA_INFO and KORTA_ADDR detail lines. It needs only POSIX sh, /etc/os-release and, for addresses, iproute2.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Interface string `json:"interface"`
CIDR string `json:"cidr"`
Family string `json:"family"` // ipv4 or ipv6
}
Address is a global-scope IP address on a network interface.
type Profile ¶
type Profile struct {
Distro string `json:"distro"` // ubuntu, debian, rhel, rocky, almalinux, centos
Version string `json:"version"` // VERSION_ID, e.g. 24.04 or 9.4
Codename string `json:"codename"` // apt hosts only, e.g. noble
Family string `json:"family"` // apt or rpm
Arch string `json:"arch"` // amd64 or arm64
Hostname string `json:"hostname"`
CPUs int `json:"cpus"`
MemoryMB int `json:"memoryMB"`
// Details shown to operators; deployment types do not depend on them.
PrettyName string `json:"prettyName,omitempty"`
Kernel string `json:"kernel,omitempty"`
CPUModel string `json:"cpuModel,omitempty"`
DiskMB int `json:"diskMB,omitempty"` // root filesystem size
DiskUsedMB int `json:"diskUsedMB,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
}
Profile is what deployment types need to know about a host.