Immich.Sync.EventStream behaviour (ex_immich v0.1.1)

Copy Markdown

Behaviour for fetching sync events and acknowledging processed chunks.

Summary

Types

Options passed through to sync_stream/3 and sync_ack/3.

t()

Callbacks

Acknowledges event ack tokens after successful processing.

Returns a stream of raw event payload maps for the requested event types.

Types

opts()

@type opts() :: keyword()

Options passed through to sync_stream/3 and sync_ack/3.

t()

@type t() :: module()

Callbacks

sync_ack(t, list, opts)

@callback sync_ack(Immich.API.Session.t(), [String.t()], opts()) ::
  {:ok, map() | term()} | {:error, term()}

Acknowledges event ack tokens after successful processing.

sync_stream(t, list, opts)

@callback sync_stream(Immich.API.Session.t(), [String.t()], opts()) ::
  {:ok, Enumerable.t(map())} | {:error, term()}

Returns a stream of raw event payload maps for the requested event types.