13 lines
404 B
Go
13 lines
404 B
Go
|
|
package consumer
|
||
|
|
|
||
|
|
// Checkpoint interface used track consumer progress in the stream
|
||
|
|
type Checkpoint interface {
|
||
|
|
Get(streamName, shardID string) (string, error)
|
||
|
|
Set(streamName, shardID, sequenceNumber string) error
|
||
|
|
}
|
||
|
|
|
||
|
|
type noopCheckpoint struct{}
|
||
|
|
|
||
|
|
func (n noopCheckpoint) Set(string, string, string) error { return nil }
|
||
|
|
func (n noopCheckpoint) Get(string, string) (string, error) { return "", nil }
|