1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00

feature(Redis): add db to config (#616)

Co-authored-by: xialeistudio <xialei@100tal.com>
This commit is contained in:
lei xia 2020-12-01 10:12:46 +08:00 committed by GitHub
parent ee96e00411
commit 9d43e492a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ func NewPool(c *Config, options ...DialOption) (p *Pool) {
DialReadTimeout(time.Duration(c.ReadTimeout)),
DialWriteTimeout(time.Duration(c.WriteTimeout)),
DialPassword(c.Auth),
DialDatabase(c.Db),
}
ops = append(ops, options...)
p1 := pool.NewSlice(c.Config)

View File

@ -34,6 +34,7 @@ type Config struct {
Proto string
Addr string
Auth string
Db int
DialTimeout xtime.Duration
ReadTimeout xtime.Duration
WriteTimeout xtime.Duration