Routemaster Client v0.3.0 Routemaster.Publisher View Source
Publishes events to the event bus.
Link to this section Summary
Functions
Shortcut function to publish create events
Shortcut function to publish delete events
Shortcut function to publish noop events
Publishes an event to the bus
Shortcut function to publish update events
Link to this section Types
Link to this section Functions
create(binary(), binary(), Keyword.t()) :: :ok | {:error, http_status()}
Shortcut function to publish create events.
See Routemaster.Publisher.send_event/4 for details on the arguments
and options.
delete(binary(), binary(), Keyword.t()) :: :ok | {:error, http_status()}
Shortcut function to publish delete events.
See Routemaster.Publisher.send_event/4 for details on the arguments
and options.
noop(binary(), binary(), Keyword.t()) :: :ok | {:error, http_status()}
Shortcut function to publish noop events.
See Routemaster.Publisher.send_event/4 for details on the arguments
and options.
send_event(binary(), binary(), binary(), Keyword.t()) :: :ok | {:error, http_status()}
Publishes an event to the bus.
Arguments:
topic: the topic to which the event should be published.event: the event type, must be one of the canonical types:create, update, delete, noop.url: a HTTPS URL at which the resource of the event can be retrieved.options, an optional keyword list with:
timestamp: an integer unix timestamp.data: any extra payload for the event, must be serializable as JSON.async: whether the event should be published in a supervised backgroundTask.
update(binary(), binary(), Keyword.t()) :: :ok | {:error, http_status()}
Shortcut function to publish update events.
See Routemaster.Publisher.send_event/4 for details on the arguments
and options.