Skip to content

sandboxd: add Client.Info for GET /v1/info - #6

Merged
CMGS merged 1 commit into
masterfrom
feat/sandboxd-client-info
Aug 17, 2026
Merged

sandboxd: add Client.Info for GET /v1/info#6
CMGS merged 1 commit into
masterfrom
feat/sandboxd-client-info

Conversation

@CMGS

@CMGS CMGS commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Why

sandboxd.Client reaches GET /v1/info only as the reply of SetPools (PUT /v1/pools); there is no read-only call. vk-sandbox therefore keeps its own sandboxdx.ListClient with a private /v1/info decoder next to the list call it already duplicates from Client.Sandboxes. Giving the client an Info lets that package retire so the sandboxd wire contract has one home.

Change

  • func (c *Client) Info(ctx) (*NodeInfo, error)getJSON("/v1/info") into the existing NodeInfo (already documented as the PUT /v1/pools and GET /v1/info reply), authenticated with the node api token like every other node-level verb.
  • TestInfo decodes a representative sandboxd reply (pools/claimed/hibernated/peers) and asserts the root-token header.

Testing

go test ./pkg/scale/... green; make lint linux + darwin 0 issues; asl ./... clean.

Follow-up in vk-sandbox: point inventory.NodeInfoSource and provider.Lister at sandboxd.Client.Info / Client.Sandboxes and delete sandboxdx + provider.ListedSandbox.

The read-only twin of SetPools, so a node publisher can read warm-pool
capacity through the operator's client instead of its own decoder.
@CMGS
CMGS merged commit c9d9fda into master Aug 17, 2026
2 checks passed
@CMGS
CMGS deleted the feat/sandboxd-client-info branch August 17, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant