Skip to main content

Module stats

Module stats 

Source
Expand description

Minimal RESP3 client for the skeg-cli stats subcommand.

Connects to a running skeg-resp3 server, runs HELLO 3, SKEG.STATS, SKEG.SHARDS, and SKEG.VINDEX.LIST, and parses the responses into the structs below. No persistent connection, no pipelining: open, query, close. This is the read-only “what’s the server doing right now” path; for live dashboards use skeg-top.

Structs§

AggregateStats
Aggregate cache + KV counters from SKEG.STATS.
ServerInfo
Server-side info gathered from HELLO 3.
ServerStats
Full report assembled from a single stats call.
ShardStats
One SKEG.SHARDS line, parsed into the four counters the server emits today. Unknown fields are ignored (same logic as AggregateStats).

Functions§

fetch
Connect to addr (e.g. 127.0.0.1:6379), gather server stats, and return them. The TCP connection is closed before this returns.