To allow other checkpoint backends we extract a checkpoint interface which future checkpoints can implement. * Add checkpoint interface for custom checkpoints * Create RedisCheckpoint to implement checkpoint interface * Swap out hosie redis library for go-redis Minor changes * Allow configuration of Redis endpoint with env var `REDIS_URL` * Replace gvt with govendor
9 lines
280 B
Go
9 lines
280 B
Go
package connector
|
|
|
|
// Checkpoint interface for functions that checkpoints need to
|
|
// implement in order to track consumer progress.
|
|
type Checkpoint interface {
|
|
CheckpointExists(shardID string) bool
|
|
SequenceNumber() string
|
|
SetCheckpoint(shardID string, sequenceNumber string)
|
|
}
|