Skip to main content

Module deploy_api

Module deploy_api 

Source
Expand description

The deploy wire: config resources, scan-lock and scan calls on a trait of their own.

A separate trait by roadmap lock: super::GatewayApi has 15 hand-written test doubles, and the deploy wire must not force a change on any of them. Every method here maps to exactly one EndpointDecl in DEPLOY_ENDPOINTS, whose declared ResponseShape is enforced in one place, send_shaped. Only id and shape are read at runtime; the method and path_template columns are tied to what each method sends by the wire_matches_the_endpoint_table contract test. A state-changing call is confirmed by a follow-up read, never by its status: the scan POST’s own 200 is a trigger-time snapshot (D4), and an acquire’s 200 body adds nothing the info read does not give.

ReqwestGatewayApi::apply_auth is the only credential site; every request built here passes through it before it is sent.

No POST (lock acquire, scan trigger, redundancy resync) is ever retried, refusals included: a repeated non-idempotent call against a production gateway is never silent. The poll engine wraps only the GET probes.

Structs§

EndpointDecl
One declared endpoint: its id, wire verb, path and 2xx shape, and the capture block the shape was read from.

Enums§

ResponseShape
What a 2xx answer on an endpoint may look like.
SecretNameListing
What a secret provider’s name listing answered.

Constants§

ACQUIRE_TIMEOUT_SLACK
Added to acquireTimeout for the per-request client timeout, so a gateway that does wait out the acquire window answers before the client gives up and reports a fake network_error (RESEARCH Pitfall 4). The live gateway never waited (D1); the slack costs nothing when it does not.
DEPLOY_ENDPOINTS
The declared deploy endpoints. Shapes are copied from the 20-LIVE-CAPTURES.md Endpoint shapes table.

Traits§

DeployApi
The deploy-facing gateway calls. Not part of super::GatewayApi.

Functions§

endpoint_decl
Look a declared endpoint up by id.
resource_list_in_collection
Read every resource of a type from one NAMED collection.
scan_and_wait
Trigger a scan and wait until it is done: scanActive is false and lastScanTimestamp exceeds the pre-trigger value read from the same gateway. An HTTP 200 on the trigger is never success on its own.