Skip to main content

Crate shipper_registry

Crate shipper_registry 

Source
Expand description

Registry API client for shipper.

This crate provides API clients for interacting with crate registries like crates.io, supporting version existence checks, sparse-index visibility polling, ownership verification, and readiness backoff loops.

§Modules

  • context — the primary RegistryClient that is Registry-aware. Accepts a full shipper_types::Registry (name, api_base, index_base) and exposes the complete registry surface used by the shipper library: API existence checks, sparse-index visibility, owner queries, is_version_visible_with_backoff with exponential-backoff evidence, etc.
  • http — a lightweight HTTP client http::HttpRegistryClient that takes a bare base-URL string. Intended for callers that do not need the full Registry context (e.g. the parallel engine helper crate).

§Example

use shipper_registry::RegistryClient;
use shipper_types::Registry;

let registry = Registry::crates_io();
let client = RegistryClient::new(registry).expect("client");
let visible = client.version_exists("serde", "1.0.0").unwrap_or(false);

Re-exports§

pub use context::Owner;
pub use context::OwnersResponse;
pub use context::RegistryClient;
pub use http::HttpRegistryClient;
pub use http::CrateInfo;
pub use http::OwnersApiUser;

Modules§

context
http
Lightweight HTTP-only registry client.

Constants§

CRATES_IO_API
Default API endpoint for crates.io
DEFAULT_TIMEOUT_SECS
Default timeout for API requests (used by HttpRegistryClient).
USER_AGENT
Default user agent for API requests.

Functions§

is_crate_visible
Check if a crate exists on the registry via its API.
is_version_visible
Check if a crate version is visible on the registry via its API.
sparse_index_path
Compute the sparse-index path for a crate name.