blob: b39fcd00de0c88b2c1bc8ed397a14d6f90ef1fae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package redis
type Config struct {
// Addr is address to use. If len > 1, cluster client will be used
Addr []string
// database number to use, 0 is used by default
DB int
// Master name for failover client, empty by default
Master string
// Redis password, empty by default
Password string
}
// InitDefaults initializing fill config with default values
func (s *Config) InitDefaults() error {
s.Addr = []string{"localhost:6379"} // default addr is pointing to local storage
return nil
}
|