Skip to main content

Module gateway

Module gateway 

Source
Expand description

Gateway management for proc connectivity. Connectivity layer for Hyperactor procs.

A proc owns actor lifecycle and mailboxes; a Gateway owns how that proc is reached. Attached procs derive advertised addresses from the gateway’s default location, receive inbound traffic through the gateway, and forward outbound traffic directly through the gateway.

Gateways route Locations: if the inbound message is source routed, the gateway looks up the next hop via its peer table and forwards accordingly; otherwise the message is delivered if the proc is attached to the gateway.

Messages with no local proc or peer route are forwarded through the default forwarder.

Structs§

AttachedProcGuard
Handle returned by Gateway::attach_proc that detaches the proc (removing its local-delivery registration) when dropped. This is the sole remover of the entry; it runs from ProcState::drop, so by the time it fires the proc’s WeakProc no longer upgrades. Drop is a no-op if the gateway has already been dropped.
Gateway
Connectivity boundary for one or more procs.
GatewayServeHandle
A running gateway server. Returned by Gateway::serve, Gateway::serve_duplex, Gateway::serve_with_listener, and Gateway::serve_via.
PeerAttachError
Error returned by Gateway::attach_peer when a peer is already attached under the given uid.
PeerAttachGuard
Handle returned by Gateway::attach_peer that removes the peer entry from the gateway’s peers map when dropped.