ARQ (arq v0.3.0) View Source
Dead simple Automatic Request Repeat implementation for independent messages.
Local party sends messages by providing an mfa or a fun/0 to ARQ.start/2.
If mfa or fun returns :stop
, the ARQ process will terminate. This is useful for synchronous responses.
Upon receipt of an asynchronous message, remote party can acknowledge the message (and stop its repeat) by calling ARQ.stop/1 or sending :stop
to the requestor process.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Starts an ARQ process with the given mfa or fun/0.
Stops the given ARQ process.
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
start(request(), Supervisor.supervisor(), opts()) :: {:ok, pid()}
Starts an ARQ process with the given mfa or fun/0.
You can provide the following options:
- :interval - number of milliseconds between function invocation repeat.
Specs
stop(GenServer.server()) :: any()
Stops the given ARQ process.