2019-07-29 04:18:40 +00:00
|
|
|
package consumer
|
|
|
|
|
|
2024-09-18 12:20:37 +00:00
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
)
|
|
|
|
|
|
2019-07-29 04:18:40 +00:00
|
|
|
// 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
|
2019-07-29 04:18:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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 }
|