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§
- Aggregate
Stats - Aggregate cache + KV counters from
SKEG.STATS. - Server
Info - Server-side info gathered from
HELLO 3. - Server
Stats - Full report assembled from a single
statscall. - Shard
Stats - One
SKEG.SHARDSline, parsed into the four counters the server emits today. Unknown fields are ignored (same logic asAggregateStats).
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.