You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
813 B
Plaintext

package main
import "core:log"
Log_Level_Map := map[string]log.Level {
"debug" = log.Level.Debug,
"info" = log.Level.Info,
"warning" = log.Level.Warning,
"error" = log.Level.Error,
"fatal" = log.Level.Fatal,
}
Program_Config :: struct {
log_level: log.Level,
api_address: string,
host_id: int,
hostname: string,
}
CPU :: struct {
// Add time?
id: int,
name: string,
socket: int,
cores: int,
usage: f16,
host_id: int,
}
Memory :: struct {
type: string, // physical/virtual
total: int,
used: int,
usage: f16,
}
Host :: struct {
hostname: string,
host_id: int,
cpus: [dynamic]CPU,
memory: [dynamic]Memory,
}
Base_Host :: struct {
hostname: string
}
Base_CPU :: struct {
name: string,
socket: int,
cores: int,
usage: f64,
host_id: int
}