Having an additional Client has added some confusion (https://github.com/harlow/kinesis-consumer/issues/45) on how to provide a custom kinesis client. Allowing `WithClient` to accept a Kinesis client it cleans up the interface. Major changes: * Remove the Client wrapper; prefer using kinesis client directly * Change `ScanError` to `ScanStatus` as the return value isn't necessarily an error Note: these are breaking changes, if you need last stable release please see here: https://github.com/harlow/kinesis-consumer/releases/tag/v0.2.0
12 lines
404 B
Go
12 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 }
|