Skip to main content

Module session

Module session 

Source
Expand description

workload.ctl on the wire: MeshIpcEnvelopes carrying a KernelMessage addressed to ServiceMethod { workload-host, <method> }, correlated with MeshRequest, plus the artifact piece protocol multiplexed on the same stream for fetch-before-load.

One connection, controller to target:

controller                                  target (workload-host)
  envelope(SignedCtl request)       ->
                                    <-      artifact frames (target fetches
  artifact frames (controller serves) ->     the package from the controller)
                                    <-      envelope(SignedCtl response)

Envelopes are JSON (first byte {); artifact frames start with a big-endian length whose first byte is 0 (frames are far below 16 MiB).

Structs§

CtlConnection
Controller end of one connection.
NoiseStream
A Noise channel as a MeshStream. Messages larger than one Noise message (artifact pieces) are split into fragments, each prefixed with a flag byte (1 = last), and reassembled on receipt. Partial fragments are kept on self, so recv stays cancel-safe.

Enums§

CallError
Why a call did not produce a signed response.

Functions§

ctl_payload
The signed control payload of an envelope addressed to workload-host.
is_envelope
True if a raw frame is an IPC envelope (JSON) rather than an artifact frame.
request_envelope
Wrap a signed request for dest as a correlated MeshRequest.
serve_connection
Serve one connection as the target’s workload-host until the peer closes it. Each request may fetch its payload over the same stream.