Concord.Sync.Event (Concord v2.0.0)

Copy Markdown View Source

A single mutation event in the Concord change stream.

Events are produced by the state machine on every mutating command and dispatched to watchers via the Sync Dispatcher.

Fields

  • type:put or :delete
  • key — the affected key
  • revision — cluster revision of this event
  • record — the new %Record{} for :put, or tombstone for :delete
  • prev_record — the previous %Record{} (if available), or nil

Summary

Types

event_type()

@type event_type() :: :put | :delete

t()

@type t() :: %Concord.Sync.Event{
  key: binary(),
  prev_record: Concord.KV.Record.t() | nil,
  record: Concord.KV.Record.t() | nil,
  revision: non_neg_integer(),
  type: event_type()
}