diff --git a/consumer_test.go b/consumer_test.go index 2f792b0..7956456 100644 --- a/consumer_test.go +++ b/consumer_test.go @@ -57,7 +57,7 @@ func TestScan(t *testing.T) { c, err := New("myStreamName", WithClient(client), WithCounter(ctr), - WithCheckpoint(cp), + WithStorage(cp), ) if err != nil { t.Fatalf("new consumer error: %v", err) @@ -119,7 +119,7 @@ func TestScanShard(t *testing.T) { c, err := New("myStreamName", WithClient(client), WithCounter(ctr), - WithCheckpoint(cp), + WithStorage(cp), ) if err != nil { t.Fatalf("new consumer error: %v", err) @@ -219,7 +219,7 @@ func TestScanShard_SkipCheckpoint(t *testing.T) { var cp = &fakeCheckpoint{cache: map[string]string{}} - c, err := New("myStreamName", WithClient(client), WithCheckpoint(cp)) + c, err := New("myStreamName", WithClient(client), WithStorage(cp)) if err != nil { t.Fatalf("new consumer error: %v", err) } diff --git a/examples/consumer/cp-mysql/main.go b/examples/consumer/cp-mysql/main.go index 386ea94..143d846 100644 --- a/examples/consumer/cp-mysql/main.go +++ b/examples/consumer/cp-mysql/main.go @@ -33,7 +33,7 @@ func main() { // consumer c, err := consumer.New( *stream, - consumer.WithCheckpoint(ck), + consumer.WithStorage(ck), consumer.WithCounter(counter), ) if err != nil { diff --git a/examples/consumer/cp-postgres/main.go b/examples/consumer/cp-postgres/main.go index daf5720..adfeafe 100644 --- a/examples/consumer/cp-postgres/main.go +++ b/examples/consumer/cp-postgres/main.go @@ -33,7 +33,7 @@ func main() { // consumer c, err := consumer.New( *stream, - consumer.WithCheckpoint(ck), + consumer.WithStorage(ck), consumer.WithCounter(counter), ) if err != nil { diff --git a/examples/consumer/cp-redis/main.go b/examples/consumer/cp-redis/main.go index 8b3450e..9455132 100644 --- a/examples/consumer/cp-redis/main.go +++ b/examples/consumer/cp-redis/main.go @@ -43,7 +43,7 @@ func main() { // consumer c, err := consumer.New( *stream, - consumer.WithCheckpoint(ck), + consumer.WithStorage(ck), consumer.WithLogger(logger), ) if err != nil {