Skip to main content

Crate skeg_rigging_net

Crate skeg_rigging_net 

Source
Expand description

skeg-rigging-net - shared, transport-agnostic types for the family of network-attached adapters that implement skeg-rigging over the wire.

This crate does not open any sockets by itself. It provides:

  • TenantLocation: enum the membrane uses to decide which transport to dispatch to.
  • RecordEnvelope: the JSON shape that hansa-side adapters wrap around payloads so the shareable flag and tags survive a transport that doesn’t model them natively (e.g. plain skeg-server, which only stores (id, bytes)).
  • NetError: the umbrella error type re-used by the concrete transport crates.

Concrete transports live in sibling crates:

  • skeg-rigging-net-resp3: talks to a skeg-server via RESP3.
  • (planned) skeg-rigging-net-http: tiny HTTP for saga distribution plus an optional alternate query path.

Structs§

RecordEnvelope
JSON / binary envelope wrapping a record’s payload, shareable flag, and tags.

Enums§

EnvelopeError
Errors from envelope decoding.
NetError
Errors surfaced by network-attached rigging adapters.
TenantLocation
Tenant address. Variants will grow as transports come online.

Constants§

DEFAULT_ZSTD_LEVEL
Default zstd compression level for RecordEnvelope::encode_binary_zstd. Level 3 is zstd’s own default; trades roughly 2x decode speed for 5-10% better ratio compared to level 1. Good for one-off envelope writes where decode is the hot path.
ENVELOPE_KEY_PREFIX
KV key prefix the bridge uses to store envelopes. Composed with a record’s vector id: hansa:rec:<id>.

Functions§

envelope_key_for
Compute the KV key for a given record id under this convention.
parse_location
Parse a TenantLocation from a URL-like string: