Skip to main content

Module admin

Module admin 

Source
Expand description

Admin REST client for operator-facing endpoints on ff-server.

Wraps POST /v1/admin/* so downstream consumers (cairn-fabric) don’t hand-roll the HTTP call for admin surfaces like HMAC secret rotation. Mirrors the server’s wire types exactly — request bodies and response shapes are defined against [ff_server::api] + [ff_server::server] and kept 1:1 with the producer.

Authentication is Bearer token. Callers pick up the token from wherever they hold it (FF_API_TOKEN env var is the common pattern, but the SDK does not read env vars on the caller’s behalf — FlowFabricAdminClient::with_token accepts a string-like token value (&str or String) via impl AsRef<str>).

Structs§

ClaimForWorkerRequest
Request body for POST /v1/workers/{worker_id}/claim.
ClaimForWorkerResponse
Response body for POST /v1/workers/{worker_id}/claim.
FlowFabricAdminClient
Client for FlowFabric admin primitives — backend-agnostic facade (v0.13 SC-10 ergonomics).
IssueReclaimGrantRequest
Request body for POST /v1/executions/{execution_id}/reclaim (RFC-024 §3.5).
PartitionRotationOutcome
Per-partition outcome of a cluster-wide waitpoint HMAC secret rotation. Returned by rotate_waitpoint_hmac_secret_all_partitions so operators can audit which partitions rotated vs. no-op’d vs. failed.
RotateWaitpointSecretRequest
Request body for POST /v1/admin/rotate-waitpoint-secret.
RotateWaitpointSecretResponse
Response body for POST /v1/admin/rotate-waitpoint-secret.

Enums§

IssueReclaimGrantResponse
Response body for POST /v1/executions/{execution_id}/reclaim (RFC-024 §3.5).

Constants§

EMBEDDED_WAITPOINT_HMAC_GRACE_MS
Grace window in ms that the embedded rotate_waitpoint_secret path forwards to the backend primitive. Matches ff-server’s default FF_WAITPOINT_HMAC_GRACE_MS (24 h) so tokens signed by the outgoing kid remain valid for a full day after rotation without the embedded-path hard-killing in-flight flows. HTTP callers get whatever the server was configured with; embedded callers get this pinned default.

Functions§

rotate_waitpoint_hmac_secret_all_partitions
Rotate the waitpoint HMAC secret across every execution partition by fanning out the ff_rotate_waitpoint_hmac_secret FCALL.