Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
type Checkpoint struct {
// contains filtered or unexported fields
}
Checkpoint stores and retrieves the last evaluated key from a DDB scan
func New ¶
func New(appName string, opts ...Option) (*Checkpoint, error)
New returns a checkpoint that uses Redis for underlying storage
func (*Checkpoint) GetCheckpoint ¶
GetCheckpoint fetches the checkpoint for a particular Shard.
func (*Checkpoint) SetCheckpoint ¶
func (c *Checkpoint) SetCheckpoint(ctx context.Context, streamName, shardID, sequenceNumber string) error
SetCheckpoint stores a checkpoint for a shard (e.g. sequence number of last record processed by application). Upon fail over, record processing is resumed from this point.
type Option ¶
type Option func(*Checkpoint)
Option is used to override defaults when creating a new Redis checkpoint
func WithClient ¶
func WithClient(client redis.UniversalClient) Option
WithClient overrides the default client
Click to show internal directories.
Click to hide internal directories.