nodeinfo

package
v0.1.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package nodeinfo detects a node's static capacity (CPU / memory / disk) for registration in state. Detection is best-effort: on exotic platforms any probe that fails falls back to zero rather than crashing the daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capacity

type Capacity struct {
	CPUMillis uint32 // logical CPUs × 1000
	MemoryMB  uint32
	DiskMB    uint32
}

Capacity is a node's schedulable resources.

func Detect

func Detect(dataDir string, log *slog.Logger) Capacity

Detect probes CPU, memory and the disk holding dataDir. Failures degrade to zero for that dimension (logged), never a panic.

Jump to

Keyboard shortcuts

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