View Source EchoPubSub.Producer.Remote (EchoPubSub v0.2.4)
Calls the producer's tasks make to remote workers. Every failure (timeout,
dead worker, nodedown, injected fault, non-:ok reply) becomes an error
result, so a task never crashes.
Summary
Functions
Sends a batch, or {:expired, node()} for a node too far behind, and returns
the verdict the producer folds into its state.
Pings the worker to learn whether it answers again. A worker older than
:ping replies {:error, :bad_message}, which still proves it is alive.
Sends {:register, node, missed_writes?} or {:resume, node} to the worker.
Types
@type batch() :: {:expired, pos_integer()} | {:messages, [term()]}
@type verdict() :: :ok | {:expired, pos_integer()} | :expired_failed | {:failed, pos_integer()}
Functions
Sends a batch, or {:expired, node()} for a node too far behind, and returns
the verdict the producer folds into its state.
Pings the worker to learn whether it answers again. A worker older than
:ping replies {:error, :bad_message}, which still proves it is alive.
@spec register(pid(), registration(), timeout()) :: :ok | :error
Sends {:register, node, missed_writes?} or {:resume, node} to the worker.