kinesis-consumer/storage.go

14 lines
477 B
Go
Raw Normal View History

2019-05-25 02:43:36 +00:00
package consumer
// Storage interface used to persist scan progress
type Storage interface {
GetCheckpoint(streamName, shardID string) (string, error)
SetCheckpoint(streamName, shardID, sequenceNumber string) error
}
// noopStorage implements the storage interface with discard
type noopStorage struct{}
func (n noopStorage) GetCheckpoint(string, string) (string, error) { return "", nil }
func (n noopStorage) SetCheckpoint(string, string, string) error { return nil }