skeg_rigging_net/lib.rs
1#![deny(unsafe_code)]
2#![warn(missing_docs)]
3
4//! `skeg-rigging-net` - shared, transport-agnostic types for the
5//! family of network-attached adapters that implement
6//! [`skeg-rigging`](https://crates.io/crates/skeg-rigging) over the
7//! wire.
8//!
9//! This crate does **not** open any sockets by itself. It provides:
10//!
11//! - [`TenantLocation`]: enum the membrane uses to decide which
12//! transport to dispatch to.
13//! - [`RecordEnvelope`]: the JSON shape that hansa-side adapters wrap
14//! around payloads so the `shareable` flag and tags survive a
15//! transport that doesn't model them natively (e.g. plain
16//! skeg-server, which only stores `(id, bytes)`).
17//! - [`NetError`]: the umbrella error type re-used by the concrete
18//! transport crates.
19//!
20//! Concrete transports live in sibling crates:
21//!
22//! - `skeg-rigging-net-resp3`: talks to a skeg-server via RESP3.
23//! - (planned) `skeg-rigging-net-http`: tiny HTTP for saga distribution
24//! plus an optional alternate query path.
25
26mod envelope;
27mod error;
28mod location;
29
30pub use envelope::{
31 DEFAULT_ZSTD_LEVEL, ENVELOPE_KEY_PREFIX, EnvelopeError, RecordEnvelope, envelope_key_for,
32};
33pub use error::NetError;
34pub use location::{TenantLocation, parse_location};