InMemoryLoom

In-memory implementation of Loom for use in tests and integration harnesses. All Seam instances produced by the same factory instance share a single in-memory mesh.

Thread-safe: the shared mesh state is protected by a Mutex. Frame delivery is channel-based (one Channel per link) so backpressure and FIFO delivery are both preserved.

Not a production transport — no discovery, no network, no serialization. Intended to be the test bedrock for :session-protocol and every layer above it.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val peers: StateFlow<Set<PeerId>>

Functions

Link copied to clipboard

Whether this fabric can be attempted now. Default FabricAvailability.Available; fabrics gated on a runtime capability override.

Link copied to clipboard
open suspend fun host(pattern: Pattern): Seam

Host / start a new session.

Link copied to clipboard
open suspend fun join(tag: Tag): Seam

Join an existing session. The advertisement carries enough info to reach the existing peer set.

Link copied to clipboard
open suspend override fun weave(rendezvous: Rendezvous): Seam

Establish a Seam according to rendezvous — either host a new session or join an existing one.