Skip to main content

Module mesh_forward

Module mesh_forward 

Source
Expand description

Forwarding over the mesh: the consumer side (forward_remote) and the serving side (serve_infer).

Security shape:

  • The consumer dials only a node id the table resolved, and only through a MeshDialer that vouches for the peer being admitted and verified. The client’s request never names a host.
  • The server serves only a verified peer, only a role this node exposed to the mesh, and only a local instance: it never forwards onward.
  • Both sides bound frame counts by bytes and time, and the server revalidates the request as it would a client’s.

Structs§

InferPeer
The peer on the other end of a stream, as established by admission.
ServeGate
Concurrency limits on the serving side: a peer cannot occupy the model server with parallel requests, and the node as a whole stays bounded.

Enums§

Served
What a served exchange did, for the caller’s accounting.

Traits§

ServePolicy
What the serving side consults about a peer. The standing checks that need no frame (peer_listed) run before a slot is taken or a byte is read.

Functions§

forward_remote
Forward req to the instance of its role on node_id and relay the response into sink.
serve_infer
Serve one forwarded request from peer on stream. The peer’s grant must qualify and the peer must be on a serve allowlist before a slot is taken or a frame read; then the first frame must arrive within the head timeout. The request is held to the mesh path allowlist, resolved to the instance the policy exposes to this peer for the role, and its body is pinned to that instance’s model.