evoq_checkpoint_store behaviour (evoq v1.14.1)

View Source

Checkpoint store behavior for projections.

Provides persistent storage for projection checkpoints. This allows projections to resume from where they left off after restart.

Callbacks

Required: - load(ProjectionName) -> {ok, Checkpoint} | {error, not_found} - save(ProjectionName, Checkpoint) -> ok | {error, Reason}

Summary

Callbacks

delete/1

(optional)
-callback delete(ProjectionName :: atom()) -> ok | {error, term()}.

load/1

-callback load(ProjectionName :: atom()) ->
                  {ok, Checkpoint :: non_neg_integer()} | {error, not_found | term()}.

save/2

-callback save(ProjectionName :: atom(), Checkpoint :: non_neg_integer()) -> ok | {error, term()}.