Expand description
ExportSink that HTTP PUTs artifact bytes to a configurable base URL.
Supports:
- S3 presigned PUT URLs
- Generic HTTP artifact endpoints
- CI systems that accept artifact uploads via HTTP
Optional retry knobs:
max_attempts— total PUT attempts, including the first tryretry_backoff_ms— fixed delay between transient retries
Upload URL behavior:
- If
base_urlcontains{cell_id}or{artifact_name}, those placeholders are replaced. - Else if
base_urlcontains a query string, it is treated as an exact URL. - Else the sink appends
/{cell_id}/{artifact_name}.
Configure CELLOS_EXPORT_HTTP_BASE_URL and optionally
CELLOS_EXPORT_HTTP_BEARER_TOKEN in the environment, then construct via
HttpExportSink::new or HttpExportSink::from_env. Base URLs must parse as http or
https after trim (empty or other schemes are rejected at construction).
§Timeout contract (EXPORT-HTTP-TIMEOUT)
The reqwest client is built with bounded request and connect timeouts so a hung artifact endpoint cannot stall a cell’s export phase indefinitely:
- Request timeout:
DEFAULT_REQUEST_TIMEOUT_MS(override viaCELLOS_EXPORT_HTTP_TIMEOUT_MS). - Connect timeout:
DEFAULT_CONNECT_TIMEOUT_MS(override viaCELLOS_EXPORT_HTTP_CONNECT_TIMEOUT_MS).
Both env vars accept a positive u64 count of milliseconds; unparseable or
zero values fall back to the default. Operators can raise the request
timeout for slow large-artifact endpoints, but the client is never
constructed without explicit timeouts.
Structs§
- Http
Export Sink - HTTP PUT export sink — uploads artifact file bytes to a resolved URL derived from
base_url.
Constants§
- DEFAULT_
CONNECT_ TIMEOUT_ MS - Default TCP connect timeout (ms) for the underlying reqwest client.
- DEFAULT_
REQUEST_ TIMEOUT_ MS - Default total request timeout (ms) applied to every artifact PUT.
- ENV_
CONNECT_ TIMEOUT_ MS - Env var to override
DEFAULT_CONNECT_TIMEOUT_MS. - ENV_
REQUEST_ TIMEOUT_ MS - Env var to override
DEFAULT_REQUEST_TIMEOUT_MS.
Functions§
- resolve_
timeout_ ms - Resolve a timeout in milliseconds from the named env var.