Skip to main content

Module client

Module client 

Source
Expand description

The client itself: one call per render, with the blob negotiation folded into it.

A render is optimistic by default — post the request, and if the server answers 409 with digests it does not hold, upload exactly those and post the identical request again. Once. A second 409 for the same digests means eviction is racing the retry or the server is broken, and either way a loop would turn a bug into a hang, so it surfaces as Error::BlobsStillMissing.

The pessimistic strategy is Client::preflight (check → upload → render, zero 409s), for callers that would rather pay a round trip than have a large upload discovered mid-render.

Structs§

Client
A handle on one mdcast-server. Cheap to clone — the underlying reqwest::Client is a shared connection pool.
ClientBuilder
Builder for a Client. base_url and token are required; the HTTP client is optional so a caller can supply its own pool, timeouts, or proxy configuration instead of taking reqwest’s defaults.