Skip to main content

Module v2

Module v2 

Source
Expand description

Schema-version-2 wire types.

Version 2 extends the version-1 snapshot with explicit capability flags for load average, swap, and memory commit. This allows the protocol to truthfully represent Linux, macOS, and Windows metric differences without fabricating unsupported values.

V2 snapshots are served from the daemon on a separate endpoint (/v2/status). V1 endpoints remain unchanged. Clients prefer v2 but fall back to v1 when the daemon does not support v2 (404 response).

Re-exports§

pub use crate::LoadAverage;
pub use crate::MemoryMetrics;
pub use crate::SystemIdentity;

Structs§

CommitMetrics
Commit charge metrics (Windows memory commit accounting).
CpuMetricsV2
CPU utilization snapshot for schema version 2.
DriveMetrics
Capacity metrics for one operator-visible mounted filesystem.
HealthResponseV2
Health and readiness response for schema version 2.
MetricCapabilitiesV2
Per-metric capability flags for schema version 2.
StatusPayloadV2
Flat v2 status response with optional drive capacity data.
StatusSnapshotV2
Top-level daemon snapshot for schema version 2.
SwapMetrics
Swap utilization for schema version 2.

Constants§

MAX_DRIVE_ENTRIES
Maximum number of drive records in a v2 status payload.
MAX_DRIVE_NAME_BYTES
Maximum UTF-8 byte length of a drive display name.
SCHEMA_VERSION_V2
Schema major version 2.