harlow / kinesis-consumer

Golang library for consuming Kinesis stream data
MIT License
264 stars 90 forks source link

Add options for db number in the redis checkpoint? #79

Closed fuzzy31u closed 5 years ago

fuzzy31u commented 5 years ago

Hello thank you for your great work.

I want to add option such as database number in redis checkpoint. &redis.Options accepts DB so could you enable to set? https://github.com/harlow/kinesis-consumer/blob/master/checkpoint/redis/redis.go#L19

Or when we pass url schema like redis://:qwerty@localhost:6379/1 then could you parse with this ParseURL method? https://github.com/go-redis/redis/blob/ce19d9c40266a99af7d77f4a2344e4dd905e5e55/example_test.go#L38

Thank you.

harlow commented 5 years ago

Hi, thanks for the note. Would it be helpful to be able to pass your own Redis client in?

client := redis.NewClient(&redis.Options{
        Addr:     "localhost:6379",
        Password: "", // no password set
        DB:       0,  // use default DB
    })
harlow commented 5 years ago

i'm going to close this issue for the time being, please feel free to reopen if you'd like to discuss passing a client in

fuzzy31u commented 5 years ago

Hi I'm sorry I didn't notice your reply. Yes your suggestion looks helpful.