angzarr_client.router.responses¶
Response types returned by saga / process-manager / rejection handlers.
Simple containers used by user code as the return value of @handles methods
on sagas (SagaHandlerResponse), process managers (ProcessManagerResponse),
and @rejected handlers (RejectionHandlerResponse). Kept separate from the
dispatch / runtime modules so application code can import them without pulling
in the dispatch machinery.
Mirrors the Rust router::responses module so cross-language users can
reach the same types at the same logical path.
Classes¶
Return value of a saga |
|
Return value of a process-manager |
|
Return shape of a saga |
Module Contents¶
- class angzarr_client.router.responses.SagaHandlerResponse(commands: list[angzarr_client.proto.angzarr.types_pb2.CommandBook] | None = None, events: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None)¶
Return value of a saga
@handlesmethod.Carries commands to forward to target domains and/or facts (events) to inject into other aggregates. Both are optional.
- commands = []¶
- events = []¶
- class angzarr_client.router.responses.ProcessManagerResponse(commands: list[angzarr_client.proto.angzarr.types_pb2.CommandBook] | None = None, process_events: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None, facts: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None)¶
Return value of a process-manager
@handlesmethod.commands: commands forwarded to target domainsprocess_events: list of EventBooks recorded into the PM’s own event stream (state). Multiple books concatenate into the wire’s singleProcessManagerHandleResponse.process_events(first non-empty book’s cover wins).facts: facts injected into other aggregates without a command
Audit finding #56 (Option B — list[EventBook]): aligns with Rust’s
Vec<EventBook>and matches the existingcommands/factslist shapes for symmetry.- commands = []¶
- process_events = []¶
- facts = []¶
- class angzarr_client.router.responses.RejectionHandlerResponse¶
Return shape of a saga
@rejectedhandler method.Carries compensation events to persist locally and an optional
Notificationto forward upstream. Mirrors Rust’srouter::responses::RejectionHandlerResponsefield-for-field.Audit finding #56 (Option B — list[EventBook]): aligns with Rust’s
Vec<EventBook>. Multiple books concatenate downstream; first non-empty book’s cover wins.