支持配置选择使用的数据库
This commit is contained in:
parent
e8b63fb863
commit
27e193a0ea
@ -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,
|
||||
|
@ -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列表
|
||||
|
Loading…
Reference in New Issue
Block a user