mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
add DB
This commit is contained in:
@ -28,6 +28,10 @@ type ReidsOption struct {
|
|||||||
Prefix string
|
Prefix string
|
||||||
Separator string
|
Separator string
|
||||||
|
|
||||||
|
// Database to be selected after connecting to the server.
|
||||||
|
// Only single-node and failover clients.
|
||||||
|
DB int
|
||||||
|
|
||||||
MaxRetries int
|
MaxRetries int
|
||||||
MinRetryBackoff time.Duration
|
MinRetryBackoff time.Duration
|
||||||
MaxRetryBackoff time.Duration
|
MaxRetryBackoff time.Duration
|
||||||
@ -56,6 +60,8 @@ func New(opt *ReidsOption) Client {
|
|||||||
Addrs: opt.Addrs,
|
Addrs: opt.Addrs,
|
||||||
Password: opt.Password,
|
Password: opt.Password,
|
||||||
|
|
||||||
|
DB: opt.DB,
|
||||||
|
|
||||||
MaxRetries: opt.MaxRetries,
|
MaxRetries: opt.MaxRetries,
|
||||||
MinRetryBackoff: opt.MinRetryBackoff,
|
MinRetryBackoff: opt.MinRetryBackoff,
|
||||||
MaxRetryBackoff: opt.MaxRetryBackoff,
|
MaxRetryBackoff: opt.MaxRetryBackoff,
|
||||||
|
Reference in New Issue
Block a user