ASM.Extensions.Persistence.Writer (ASM v0.9.2)

Copy Markdown View Source

Async writer process that persists events outside the run process path.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %ASM.Extensions.Persistence.Writer{notify: pid() | nil, store: pid()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

enqueue(writer, event)

@spec enqueue(pid(), ASM.Event.t()) :: :ok

flush(writer, timeout \\ 5000)

@spec flush(pid(), timeout()) :: :ok | {:error, ASM.Error.t()}

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()