diff --git a/client.go b/client.go index a91150e..23aa536 100644 --- a/client.go +++ b/client.go @@ -145,6 +145,7 @@ func (o *OwnClient) GetRealClientWithError(instanceFlag string) (*redisClient.Cl func (o *OwnClient) AddClient(instanceFlag string, instanceConfig *define.Options) error { instance := redisClient.NewClient(&redisClient.Options{ + DB: instanceConfig.DB, Addr: instanceConfig.Addr, ClientName: instanceConfig.ClientName, Dialer: nil, diff --git a/define/config.go b/define/config.go index 956c93d..e087659 100644 --- a/define/config.go +++ b/define/config.go @@ -8,6 +8,7 @@ package define type Options struct { + DB int `json:"db" yaml:"db" ini:"db" toml:"db"` // 选择的数据库序号 Network string `json:"network" yaml:"network" ini:"network" toml:"network"` // 网络连接方式 // A seed list of host:port addresses of cluster nodes. Addr string `json:"addr" yaml:"addr" ini:"addr" toml:"addr"` // 集群IP列表