kinesis-consumer/store.go

18 lines
564 B
Go
Raw Normal View History

package consumer
2024-09-18 12:20:37 +00:00
import (
"context"
)
// Store interface used to persist scan progress
type Store interface {
2024-09-18 12:20:37 +00:00
GetCheckpoint(ctx context.Context, streamName, shardID string) (string, error)
SetCheckpoint(ctx context.Context, streamName, shardID, sequenceNumber string) error
}
// noopStore implements the storage interface with discard
type noopStore struct{}
2024-09-18 12:20:37 +00:00
func (n noopStore) GetCheckpoint(context.Context, string, string) (string, error) { return "", nil }
func (n noopStore) SetCheckpoint(context.Context, string, string, string) error { return nil }