EventStore v0.12.0 EventStore.Registration behaviour View Source
Process registry specification
Link to this section Summary
Functions
Allow a registry provider to handle the standard GenServer
callback functions
Use the EventStore.Registration
module to import the registry_provider/0
and via_tuple/1
functions
Get the configured registry provider, defaults to :local
if not configured
Callbacks
Return an optional supervisor spec for the registry
Publish events to any EventStore.Publisher
process
Return a :via
tuple to route a message to a process by its registered name
Get the pid of a registered name
Link to this section Functions
Allow a registry provider to handle the standard GenServer
callback functions
Use the EventStore.Registration
module to import the registry_provider/0
and via_tuple/1
functions.
Get the configured registry provider, defaults to :local
if not configured
Link to this section Callbacks
Return an optional supervisor spec for the registry
publish_events(stream_uuid :: term(), events :: [EventStore.RecordedEvent.t()]) :: :ok
Publish events to any EventStore.Publisher
process
start_child(name :: term(), supervisor :: module(), args :: [any()]) :: {:ok, pid()} | {:error, reason :: term()}
start_child(name :: term(), supervisor :: module(), args :: [any()]) :: {:ok, pid()} | {:error, reason :: term()}
via_tuple(name :: term()) :: {:via, module(), name :: term()}
Return a :via
tuple to route a message to a process by its registered name
whereis_name(name :: term()) :: pid() | :undefined
Get the pid of a registered name.
Returns :undefined
if the name is unregistered.