natssysclient: add server-scoped monitoring endpoints#55
Conversation
Adds clients for IDZ, ROUTEZ, GATEWAYZ, LEAFZ, ACCOUNTZ, PROFILEZ, EXPVARZ, IPQUEUESZ, and RAFTZ, each with single-server and cluster PING variants. Response and option types mirror nats-server's server/monitor.go. EXPVARZ, IPQUEUESZ, and RAFTZ require nats-server 2.11+; the README marks them accordingly. Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
4bb7381 to
30fcc46
Compare
|
@claude review this PR |
|
Claude finished @piotrpio's task in 2m 8s —— View job PR Review: natssysclient: add server-scoped monitoring endpoints
Overall this is a well-structured, comprehensive addition that faithfully follows existing patterns. Tests are thorough and include both single-server and cluster-wide ( Issues1. Pre-existing typo in
ErrInvalidServerID = errors.New("sever with given ID does not exist")"sever" should be "server". This is pre-existing but the PR already modifies 2. Embedding order inconsistency in
// Inconsistent — EventFilterOptions first
IpqueueszEventOptions struct {
EventFilterOptions
IpqueueszOptions
}
RaftzEventOptions struct {
EventFilterOptions
RaftzOptions
}Every other // Consistent pattern from routez.go, gatewayz.go, leafz.go, accountz.go, etc.
RoutezEventOptions struct {
RoutezOptions
EventFilterOptions
}This doesn't affect correctness (JSON marshaling is field-name based, not order-based), but it's inconsistent with the established pattern. Minor Notes
SummaryThe PR is clean, well-tested, and follows existing conventions. The two issues above are worth addressing — the typo is a definite fix and the embedding-order inconsistency keeps the API surface predictable. Everything else looks good to go. |
Adds clients for missing SRV monitoring endpoints the library didn't previously cover, each exposed with a single-server method and a cluster-wide
*PingmethodIdz/IdzPingRoutez/RoutezPingGatewayz/GatewayzPingLeafz/LeafzPingAccountz/AccountzPingProfilez/ProfilezPingExpvarz/ExpvarzPingIpqueuesz/IpqueueszPingRaftz/RaftzPingSigned-off-by: Piotr Piotrowski piotr@synadia.com