ack v0.3.0 Ack.Horn View Source
The publisher, sending broadcasts when ACK is received. It serves three
different channels:
{Ack.Horn, :ack}to send broadcast when theACKcomes{Ack.Horn, :nack}to send broadcast when theNACKcomes{Ack.Horn, :error}to send broadcast when the client:- called back with the wrong key (
status: :invalid) - called back with the unknown
ACKvalue (status: :unknown) - did not called back and the timeout has expired.
- called back with the wrong key (
Host and client might agree on using more verbs besides ACK and NACK.
To handle this the host should implement somewhat like the following clause:
def handle_envio(%{status: :unknown, key: key, value: verb} = message, state) do
state = BusinessLogic.on_other_verb(key)
{:noreply, state}
end
Link to this section Summary
Link to this section Functions
Link to this function
broadcast(message)
View Source
broadcast(message)
View Source
broadcast(message :: map()) :: :ok
broadcast(message :: map()) :: :ok