Skip to main content

Module api

Module api 

Source
Expand description

HTTP wire types exchanged between the CLI, the edge worker, the scheduler Durable Object, and trusted CI.

Field docs describe the wire meaning of each payload; the validated identity newtypes from crate::identity carry the invariants.

Structs§

AdminInFlight
One in-flight (dispatched/running) queue row in AdminStatus.
AdminStatus
Response of GET /api/v1/admin/status — the scheduler’s operator view.
AdminTargetStats
Per-target completion tallies over the trailing 24 hours.
AdmissionRequest
Request body for POST /api/v1/admissions: the misses a client’s local index resolution found, plus the resolved graph the edge needs to re-derive the enqueue set with dominator pruning.
ArtifactIndexPage
Response body for GET /api/v1/admin/index/{target}/{rustc_version}.
ArtifactInspection
Response of GET /api/v1/admin/artifacts/{target}/{rustc_version}/{c_metadata}: the D1 catalog row plus the bundle image’s OCI manifest read from GHCR.
ArtifactListQuery
Query for GET /api/v1/admin/artifacts — a bounded catalog listing used to preview a prune and for ad-hoc inspection.
ArtifactPruneRequest
Request body for POST /api/v1/admin/artifacts/prune.
ArtifactPruneResponse
Response of POST /api/v1/admin/artifacts/prune.
ArtifactRecord
Artifact record CI POSTs to the edge’s register endpoint after a build.
BuildCompleteReport
CI reports job completion to the scheduler DO.
BuildTaskPayload
The task the scheduler dispatches to stow-build, carried verbatim as the workflow_dispatch input of the trusted build workflow.
CoverageArtifact
One servable artifact identity inside CoverageTarget.
CoverageTarget
One target’s servable identities inside CrateCoverage.
CrateCoverage
Response of GET /api/v1/admin/coverage/{crate} — per-CI-target servable identities for one crate (one version when version was given).
CrateFeature
One feature a crate version declares.
CrateFeaturesResponse
Response body for GET /api/v1/crates/{crate_name}/versions/{version}/features.
CrateRequest
Request body for POST /api/v1/requests: a human asking for one crate to be built into the public cache.
CrateRequestOutcome
Response of POST /api/v1/requests: what the edge resolved and where each supported target stands.
CrateRequestTarget
Per-target outcome inside a CrateRequestOutcome.
CrateSearchHit
One crate in a GET /api/v1/crates/search result.
CrateSearchResponse
Response body for GET /api/v1/crates/search.
CrateVersionsResponse
Response body for GET /api/v1/crates/{crate_name}/versions.
DependencyGraphEntry
A normalized dependency entry from a resolved Cargo dependency graph.
EnqueueAdmission
Admission ticket the edge mints for one canonical enqueue task when a public request misses the cache.
EnqueueDependency
One task-level dependency that must complete before its parent dispatches.
EnqueueRequest
Request body for scheduler task submission.
EnqueueTicket
Request body for POST /api/v1/enqueue: the redemption of an EnqueueAdmission.
ObserveRun
Body for the scheduler DO’s /tasks/observe-run.
OciDescriptor
One blob descriptor inside an OciManifest.
OciManifest
OCI image manifest — the document a manifests/<reference> GET serves.
PanicSwitch
The anonymous-traffic circuit breaker (“panic switch”).
PreheatPlanRequest
Request body for POST /api/v1/admin/preheat/plan — a dry run of the resolver’s closure expansion and dominance pruning for one crate request. Nothing is enqueued.
PreheatPlanResponse
Response of POST /api/v1/admin/preheat/plan.
PreheatPlanTarget
One target’s enqueue plan inside PreheatPlanResponse.
ProjectSource
A git checkout the trusted build compiles instead of a crates.io tarball, resolved by the checkout’s own Cargo.lock.
QueueFilter
Row filter for GET /api/v1/admin/queue and the filter half of a QueueSelector.
QueueMutationResult
Response of the queue retry|cancel|promote|purge endpoints: how many rows the transition touched.
QueueSelector
Selector for POST /api/v1/admin/queue/{retry,cancel,promote,purge}.
QueueTask
One queue row as GET /api/v1/admin/queue reports it.
RegisterArtifactsRequest
Request body for POST /api/v1/admin/artifacts/register.
RequestStatus
Point-in-time view of one scheduler task, returned by GET /api/v1/requests/{task_id}.
ResolvedDependencyGraphDependency
One exact dependency edge in a client-resolved Cargo graph.
ResolvedDependencyGraphEntry
One exact crates.io package node resolved from the client’s current lockfile graph.
SchedulerStatus
Scheduler DO queue status for monitoring.
SchedulerSubmitResponse
Response of POST /api/v1/scheduler/tasks/submit — what a request batch became after canonicalization and enqueue.
UsageStatEntry
One (name, hits) bucket of a UsageStats leaderboard.
UsageStats
Public aggregate usage statistics served by GET /api/v1/stats.

Enums§

CrateRequestState
Per-target state reported inside CrateRequestTarget.
EnqueueSource
Where an enqueue request originated.
QueueTaskStatus
Lifecycle of one scheduler queue row.
RunnerFamily
The GitHub Actions runner pool a CI target builds on.
TaskLane
Which scheduler lane a queue row belongs to.

Constants§

CI_TARGET_TRIPLES
The compilation target triples the trusted CI build fleet covers.

Functions§

is_ci_target
Whether trusted CI has a runner that can build this target.
runner_family
Which runner family build-crate.yml dispatches this target to, or None for a target its runs-on map does not name.