EventStore v0.12.0 EventStore.Registration.LocalRegistry behaviour View Source
Local process registration, restricted to a single node, using Elixir’s Registry
Link to this section Summary
Functions
Return the local supervisor child spec
Starts a uniquely named child process of a supervisor using the given module and args
Return a :via
tuple to route a message to a process by its registered name
Get the pid of a registered name
Callbacks
Publish events to the EventStore.Publisher
process
Link to this section Functions
Return the local supervisor child spec
Link to this function
start_child(name, supervisor, args)
View Source
start_child(name :: term(), supervisor :: module(), args :: [any()]) :: {:ok, pid()} | {:error, reason :: term()}
Starts a uniquely named child process of a supervisor using the given module and args.
Registers the pid with the given name.
Link to this function
via_tuple(name)
View Source
via_tuple(name :: term()) :: {:via, module(), name :: term()}
Return a :via
tuple to route a message to a process by its registered name
Link to this function
whereis_name(name)
View Source
whereis_name(name :: term()) :: pid() | :undefined
Get the pid of a registered name.
Link to this section Callbacks
Link to this callback
publish_events(stream_uuid, events)
View Source
publish_events(stream_uuid :: term(), events :: [EventStore.RecordedEvent.t()]) :: :ok
Publish events to the EventStore.Publisher
process