EventStore.PubSub (EventStore v1.3.2) View Source

Pub/sub using Elixir's local Registry module.

Link to this section Summary

Functions

Broadcasts message on given topic.

Return the child spec.

Subscribes the caller to the given topic.

Link to this section Functions

Link to this function

broadcast(event_store, topic, message)

View Source

Specs

broadcast(EventStore.t(), binary(), term()) :: :ok

Broadcasts message on given topic.

Specs

child_spec(EventStore.t()) :: [:supervisor.child_spec()]

Return the child spec.

Link to this function

subscribe(event_store, topic, opts \\ [])

View Source

Specs

subscribe(EventStore.t(), binary(),
  selector: (EventStore.RecordedEvent.t() -> any()),
  mapper: (EventStore.RecordedEvent.t() -> any())
) :: :ok | {:error, term()}

Subscribes the caller to the given topic.