mirror of
https://github.com/wonli/aqi.git
synced 2024-06-28 09:57:05 +08:00
16 lines
677 B
Go
16 lines
677 B
Go
|
package config
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type Redis struct {
|
||
|
Addr string `yaml:"addr" json:"addr"`
|
||
|
Username string `yaml:"username" json:"username"`
|
||
|
Pwd string `yaml:"pwd" json:"pwd"`
|
||
|
Db int `yaml:"db" json:"db"`
|
||
|
LogLevel int `yaml:"logLevel"`
|
||
|
MinIdleConns int `yaml:"minIdleConns" json:"minIdleConns"` // Minimum number of idle connections, useful when establishing new connections is slow.
|
||
|
IdleTimeout time.Duration `yaml:"idleTimeout" json:"idleTimeout,omitempty"` // Time after which idle connections are closed by the client, default is 5 minutes, -1 disables the setting.
|
||
|
}
|