ExESDB.SnapshotsReader (ex_esdb v0.1.0)

Provides functions for reading snapshots

Summary

Functions

cluster_id(store, source_uuid, stream_uuid)

hr_snapshots_reader_name(store_id, source_uuid, stream_uuid)

list_snapshots(store, source_uuid \\ :any, stream_uuid \\ :any)

@spec list_snapshots(
  store :: atom(),
  source_uuid :: binary() | :any,
  stream_uuid :: binary() | :any
) :: {:ok, [map()]} | {:error, term()}

read_snapshot(store, source_uuid, stream_uuid, version)

@spec read_snapshot(
  store :: atom(),
  source_uuid :: binary(),
  stream_uuid :: binary(),
  version :: non_neg_integer()
) :: {:ok, map()} | {:error, term()}

Description

Reads a snapshot version from the store for the given source and stream uuids

Parameters

  • store - the store to read from
  • source_uuid - the source uuid
  • stream_uuid - the stream uuid
  • version - the version of the snapshot to read

Returns

  • {:ok, map()} - the snapshot

start_worker(store, source_uuid, stream_uuid)