evoq_feedback behaviour (evoq v1.14.1)
View SourceFeedback behaviour for evoq.
Feedback is the response to a Hope. It carries the result of command execution at the responder side, enabling session-level consistency.
Success feedback contains the post-event aggregate state so the requester has immediate truth without querying remote read models.
Error feedback contains the reason for failure.
Naming convention: {hope}_feedback_v1
Required Callbacks
- feedback_type() -> binary() - from_result(Result) -> map() - to_result(Payload) -> {ok, term()} | {error, term()}
Optional Callbacks
- serialize(Payload) -> {ok, binary()} | {error, Reason} - deserialize(Binary) -> {ok, map()} | {error, Reason}
Summary
Functions
Default deserialization using OTP 27 json module.
Default serialization using OTP 27 json module.
Callbacks
-callback feedback_type() -> binary().