Routemaster Client v0.3.0 Routemaster.Drain.Event View Source

An event received by the drain.

Fields:

  • type, e.g. created, updated.
  • url, the canonical URL where the resource can be found.
  • t, the timestamp of when the event was emitted,
  • data, an optional payload.
  • topic, the topic of the event.

See Routemaster.Publisher.Event for the outgoing events.

Link to this section Summary

Functions

Verifies if an event contains all the mandatory fields

Link to this section Types

Link to this type t() View Source
t() :: %Routemaster.Drain.Event{
  :type => type(),
  :url => url(),
  :t => timestamp(),
  :topic => topic(),
  optional(:data) => data()
}

Link to this section Functions

Link to this function complete?(event) View Source
complete?(t()) :: boolean()

Verifies if an event contains all the mandatory fields.