Scriba.Event (Scriba v0.1.0)

Copy Markdown View Source

The unit of data that flows from a Scriba.Source through the engine to a Scriba.Target.

A source decodes its native event into this shape and wraps it in a Broadway.Message. Handlers see the decoded :data and the engine routes events to workers by hashing :stream_id.

Summary

Types

t()

@type t() :: %Scriba.Event{
  data: term(),
  id: String.t(),
  metadata: map(),
  occurred_at: DateTime.t(),
  position: non_neg_integer(),
  stream_id: String.t(),
  type: String.t()
}