Skip to main content

Module remote_dispatch

Module remote_dispatch 

Source
Expand description

Generic async dispatch of flow work to a separate runtime over NATS pub/sub. The RemoteDispatchHandler trait isolates the transport so it can be swapped (e.g. to greentic-events EventBus) without touching the flow engine.

Structs§

BuiltRequest
A built NATS message (broker-free; unit-testable).
NatsDispatcher
Publishes dispatch requests to NATS via raw async-nats.
RemoteDispatch
Everything needed to dispatch one unit of work to a runtime.

Enums§

RemoteDispatchAction
Outcome of a dispatch: the flow waits for a response, or it was fire-and-forget.

Traits§

RemoteDispatchHandler
Transport-agnostic publisher for runtime dispatch requests. Implemented over raw async-nats today; the trait lets a greentic-events EventBus be swapped in later without changing the flow engine.

Functions§

build_request
Pure builder: turn a RemoteDispatch into the subject/headers/body to publish plus the resulting action. No I/O — unit-testable without a broker.
build_timeout_response_message
Build the subject, headers, and serialized body for a timeout error response.