Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OffsetStore ¶
type OffsetStore interface { // Connect connects to the offset store Connect(ctx context.Context) error // Disconnect disconnects the offset store Disconnect(ctx context.Context) error // Ping verifies a connection to the database is still alive, establishing a connection if necessary. Ping(ctx context.Context) error // WriteOffset writes the current offset of the event consumed for a given projection id // Note: persistence id and the projection name make a record in the journal store unique. Failure to ensure that // can lead to some un-wanted behaviors and data inconsistency WriteOffset(ctx context.Context, offset *egopb.Offset) error // GetCurrentOffset returns the current offset of a given projection id GetCurrentOffset(ctx context.Context, projectionID *egopb.ProjectionId) (currentOffset *egopb.Offset, err error) // ResetOffset resets the offset of given projection to a given value across all shards ResetOffset(ctx context.Context, projectionName string, value int64) error }
OffsetStore defines the contract needed to persist offsets
Click to show internal directories.
Click to hide internal directories.