Fix WithStorage option

This commit is contained in:
Harlow Ward 2019-05-25 12:30:48 -07:00
parent 2ffea4027d
commit c690ce2822
4 changed files with 6 additions and 6 deletions

View file

@ -57,7 +57,7 @@ func TestScan(t *testing.T) {
c, err := New("myStreamName", c, err := New("myStreamName",
WithClient(client), WithClient(client),
WithCounter(ctr), WithCounter(ctr),
WithCheckpoint(cp), WithStorage(cp),
) )
if err != nil { if err != nil {
t.Fatalf("new consumer error: %v", err) t.Fatalf("new consumer error: %v", err)
@ -119,7 +119,7 @@ func TestScanShard(t *testing.T) {
c, err := New("myStreamName", c, err := New("myStreamName",
WithClient(client), WithClient(client),
WithCounter(ctr), WithCounter(ctr),
WithCheckpoint(cp), WithStorage(cp),
) )
if err != nil { if err != nil {
t.Fatalf("new consumer error: %v", err) t.Fatalf("new consumer error: %v", err)
@ -219,7 +219,7 @@ func TestScanShard_SkipCheckpoint(t *testing.T) {
var cp = &fakeCheckpoint{cache: map[string]string{}} 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 { if err != nil {
t.Fatalf("new consumer error: %v", err) t.Fatalf("new consumer error: %v", err)
} }

View file

@ -33,7 +33,7 @@ func main() {
// consumer // consumer
c, err := consumer.New( c, err := consumer.New(
*stream, *stream,
consumer.WithCheckpoint(ck), consumer.WithStorage(ck),
consumer.WithCounter(counter), consumer.WithCounter(counter),
) )
if err != nil { if err != nil {

View file

@ -33,7 +33,7 @@ func main() {
// consumer // consumer
c, err := consumer.New( c, err := consumer.New(
*stream, *stream,
consumer.WithCheckpoint(ck), consumer.WithStorage(ck),
consumer.WithCounter(counter), consumer.WithCounter(counter),
) )
if err != nil { if err != nil {

View file

@ -43,7 +43,7 @@ func main() {
// consumer // consumer
c, err := consumer.New( c, err := consumer.New(
*stream, *stream,
consumer.WithCheckpoint(ck), consumer.WithStorage(ck),
consumer.WithLogger(logger), consumer.WithLogger(logger),
) )
if err != nil { if err != nil {