Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Host Port build Addr Host string // Port 端口 Port string // Password 密码 Password string `json:"password"` // DB,默认为0 DB int `json:"db"` // PoolSize 最大连接池限制 默认每个CPU10个连接 PoolSize int `json:"poolSize"` // MaxRetries 网络相关的错误最大重试次数 默认8次 MaxRetries int `json:"maxRetries"` // MinIdleConns 最小空闲连接数 MinIdleConns int `json:"minIdleConns"` // DialTimeout 拨超时时间 DialTimeout time.Duration `json:"dialTimeout"` // ReadTimeout 读超时 默认3s ReadTimeout time.Duration `json:"readTimeout"` // WriteTimeout 读超时 默认3s WriteTimeout time.Duration `json:"writeTimeout"` // IdleTimeout 连接最大空闲时间,默认60s, 超过该时间,连接会被主动关闭 IdleTimeout time.Duration `json:"idleTimeout"` // Debug开关 Debug bool `json:"debug"` }
Click to show internal directories.
Click to hide internal directories.