2018-07-29 05:53:33 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-29 17:13:03 +00:00
|
|
|
// noopCheckpoint implements the checkpoint interface with discard
|
2018-07-29 05:53:33 +00:00
|
|
|
type noopCheckpoint struct{}
|
|
|
|
|
|
|
|
|
|
func (n noopCheckpoint) Set(string, string, string) error { return nil }
|
|
|
|
|
func (n noopCheckpoint) Get(string, string) (string, error) { return "", nil }
|