Expand description
Cross-transport types: error taxonomy, the Transport trait, the
PackKey digest wrapper, and the retry/backoff helpers used by
every transport implementation (memory, file, HTTP, S3, SSH, enc).
retrying is the single shared driver of the SPEC-TRANSPORT §7
ladder — every transport’s retrying/with_retry method is a thin
wrapper around it, so the backoff/classification policy lives in
exactly one place instead of being reimplemented per crate.
The SSH wire format is defined in mkit-rpc’s ssh.proto and
lives in mkit_rpc::mkit::rpc::v1::ssh; transport-ssh consumes
the schema directly. The hand-rolled OP_HELLO byte format that
used to live in this module has been retired.
Re-exports§
pub use crate::refs::RefWriteCondition;
Modules§
- async_
shim - Sync-over-async shim for transports whose underlying cipher / I/O is
async (e.g.
commonware-stream::encrypted) but whoseTransporttrait surface is intentionally sync.
Structs§
- Backoff
Iterator - Exponential-backoff iterator used by all transports.
- Pack
Chunk - One bounded-size segment of a streamed pack transfer.
- PackKey
- A 32-byte pack digest used as the content-address for an uploaded
pack. This is the same 32 bytes as
Hashbut wrapped so pack digests and object hashes do not silently cross purposes at API boundaries.
Enums§
- Advance
Outcome - Result of
Transport::advance_refs— a two-ref branch advance. - Transport
Error - Errors that any transport may surface across the
Transportboundary. Implementations MAY wrap transport-specific errors internally but MUST map them to one of these variants before returning.
Constants§
- BACKOFF_
CAP - Upper bound on any individual sleep.
- BACKOFF_
INITIAL - Initial sleep between attempts.
- BACKOFF_
MAX_ ATTEMPTS - Max attempts for the default backoff ladder.
- PACK_
BODY_ LIMIT - Per-pack body size ceiling enforced by every transport that ingests
pack bytes (HTTP
Content-Length, S3GetObject, SSHDownloadPackHeader.total_bytes). On 64-bit targets, 4 GiB matches the pack-format addressable range; pointer-width-limited targets cap at their maximum addressable buffer size instead of failing to compile. - PACK_
BODY_ LIMIT_ USIZE usize-typed mirror ofPACK_BODY_LIMITforVec-shaped buffer caps. The assertion below prevents silent truncation on any target.
Traits§
- Transport
- The mkit transport vtable.
Functions§
- is_
retryable - Return
trueif a transport should retry after seeingerr. - pack_
key_ from_ hex - Parse a
PackKeyfrom a 64-char lowercase hex string. - retrying
- Transport-agnostic retry driver shared by every
Transportimplementation, so the SPEC-TRANSPORT §7 ladder lives in exactly one place instead of being reimplemented per crate. Extracted from what wasHttpTransport::retryinginmkit-transport-http.
Type Aliases§
- Transport
Result - Result alias used throughout this module.