Skip to main content

Module protocol

Module protocol 

Source
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).

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 whose Transport trait surface is intentionally sync.

Structs§

BackoffIterator
Exponential-backoff iterator used by all transports.
PackKey
A 32-byte pack digest used as the content-address for an uploaded pack. This is the same 32 bytes as Hash but wrapped so pack digests and object hashes do not silently cross purposes at API boundaries.

Enums§

TransportError
Errors that any transport may surface across the Transport boundary. 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, S3 GetObject, SSH DownloadPackHeader.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 of PACK_BODY_LIMIT for Vec-shaped buffer caps. The assertion below prevents silent truncation on any target.

Traits§

Transport
The mkit transport vtable.

Functions§

is_retryable
Return true if a transport should retry after seeing err.
pack_key_from_hex
Parse a PackKey from a 64-char lowercase hex string.

Type Aliases§

TransportResult
Result alias used throughout this module.