dispatch_host_command

Function dispatch_host_command 

Source
pub fn dispatch_host_command<R: SagaActionRunner>(
    cmd: &Command,
    runner: &R,
    lru: &Arc<Mutex<SagaIdempotencyLru>>,
    reply_tx: &UnboundedSender<Command>,
) -> DispatchOutcome
Expand description

Dispatch a host-bound saga Command: check the LRU, run the action if not cached, build the corresponding Report*, cache it, and send via reply_tx. Returns the outcome so callers can log / count fresh vs. duplicate dispatch.

lru is a shared Arc<Mutex<...>> so the read-loop task and any future direct-dispatch path share a single cache.