Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SystemInfo ¶
type SystemInfo struct {
// TotalMemoryBytes is the total system memory in bytes
TotalMemoryBytes uint64
// CPUCount is the number of logical CPUs
CPUCount int
// OSType is the operating system type
OSType OSType
// PostgreSQLVersion is the PostgreSQL major version
PostgreSQLVersion float64
// DiskType is the detected or assumed disk type
DiskType DiskType
// IsContainer indicates if running inside a container
IsContainer bool
// ContainerMemory is the container memory limit in bytes (0 if not limited)
ContainerMemory uint64
}
SystemInfo contains detected system information
func DetectSystemInfo ¶
func DetectSystemInfo() (*SystemInfo, error)
DetectSystemInfo automatically detects system information
func (*SystemInfo) String ¶
func (si *SystemInfo) String() string
String returns a human-readable representation of the system info
func (*SystemInfo) TotalMemoryGB ¶
func (si *SystemInfo) TotalMemoryGB() float64
TotalMemoryGB returns total memory in GB
func (*SystemInfo) TotalMemoryKB ¶
func (si *SystemInfo) TotalMemoryKB() uint64
TotalMemoryKB returns total memory in KB
func (*SystemInfo) TotalMemoryMB ¶
func (si *SystemInfo) TotalMemoryMB() float64
TotalMemoryMB returns total memory in MB
Click to show internal directories.
Click to hide internal directories.