# `Concord.Sync.Event`
[🔗](https://github.com/gsmlg-dev/concord/blob/main/lib/concord/sync/event.ex#L1)

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`

# `event_type`

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

# `t`

```elixir
@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()
}
```

