phoenix_pubsub_eventstore v2.0.1 Phoenix.PubSub.EventStore View Source
Phoenix PubSub adapter backed by EventStore.
An example usage (add this to your supervision tree):
{Phoenix.PubSub,
[name: MyApp.PubSub,
adapter: Phoenix.PubSub.EventStore,
eventstore: MyApp.EventStore]
}
where MyApp.EventStore
is configured separately based on the EventStore
documentation.
Optional parameters:
serializer
: used for converting messages into structs thatEventStore
can handle. The default serializer isPhoenix.PubSub.EventStore.Serializer.Base64
. Any module that implementsserialize/1
anddeserialize/1
may be used as long as they produce data thatEventStore
can work with.unique_id_fn
: function that generates a unique ID to identify each instance of the pubsub. It receives one parameter, that is the pubsub's name. If not specified, then a UUID is generated withUUID.uuid4()
.
Link to this section Summary
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Start the server
This function is called by Phoenix.PubSub