@todo add documentation
Summary
Types
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation, make sure to include the points below
@todo add documentation
@todo add documentation
Callbacks
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
Types
@type event() :: %{:id => pos_integer(), optional(atom()) => any()}
@todo add documentation
@type position() :: non_neg_integer()
@todo add documentation
@type reason() :: binary() | Exception.t() | term()
@todo add documentation
@type record() :: Ecto.Schema.schema()
@todo add documentation
@type repo() :: Ecto.Repo.t()
@todo add documentation
@type side_effect() :: Derive.SideEffect.t()
@todo add documentation, make sure to include the points below
Key points:
- a side effect can be any struct that implements the Derive.SideEffect protocol
@type state() :: t()
@todo add documentation
@type t() :: %Derive{ batch_size: pos_integer(), consumer: module(), cursor: %Derive.Cursor{ __meta__: term(), consumer_id: term(), last_synced_at: term(), position: term(), stuck_reason: term(), stuck_since: term() }, error_count: non_neg_integer(), filters: [{atom(), term()}, ...], repo: Ecto.Repo.t(), timer: reference() | nil }
@todo add documentation
Callbacks
@callback before_persist([side_effect(), ...]) :: [side_effect(), ...]
@todo add documentation
@callback fetch(repo(), [filter | option, ...]) :: [event()] when filter: {atom(), term()}, option: {:after, position()} | {:take, pos_integer()}
@todo add documentation
@callback handle_event(event()) :: [side_effect()] | :skip
@todo add documentation
@todo add documentation
@todo add documentation
@todo add documentation
Functions
@todo add documentation
Returns a specification to start this module under a supervisor.
See Supervisor.