EventStore v0.15.1 EventStore.Registration behaviour View Source

Registration specification for EventStore pub/sub.

Link to this section Summary

Functions

Broadcasts message on given topic

Return an optional supervisor spec for the registry

Get the configured registry provider, defaults to :local if not configured

Subscribes the caller to the given topic

Callbacks

Broadcasts message on given topic

Return an optional supervisor spec for the registry

Subscribes the caller to the given topic

Link to this section Functions

Link to this function broadcast(topic, message) View Source
broadcast(binary(), term()) :: :ok | {:error, term()}

Broadcasts message on given topic.

Return an optional supervisor spec for the registry.

Get the configured registry provider, defaults to :local if not configured.

Link to this function subscribe(topic, opts \\ []) View Source
subscribe(binary(),
  selector: (EventStore.RecordedEvent.t() -> any()),
  mapper: (EventStore.RecordedEvent.t() -> any())
) :: :ok | {:error, term()}

Subscribes the caller to the given topic.

Link to this section Callbacks

Link to this callback broadcast(binary, term) View Source
broadcast(binary(), term()) :: :ok | {:error, term()}

Broadcasts message on given topic.

Return an optional supervisor spec for the registry.

Link to this callback subscribe(binary, list) View Source
subscribe(binary(), [{:mapper, (EventStore.RecordedEvent.t() -> any())}]) ::
  :ok | {:error, term()}

Subscribes the caller to the given topic.