-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
29 lines (24 loc) · 871 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package client
import "time"
const (
TimeoutFieldName = "client.http.timeout"
MaxIdleConnectionsFieldName = "client.http.maximum.idle.connections"
MaxIdleConnectionsPerHostFieldName = "client.http.maximum.idle.host"
MaxConnectionsPerHostFieldName = "client.http.maximum.connections"
SecureVerifyFieldName = "client.http.secure_verify"
TimeoutDefault = 30 * time.Second
MaxIdleConnectionsDefault = uint16(100)
MaxIdleConnectionsPerHostDefault = uint16(10)
MaxConnectionsPerHostDefault = uint16(20)
SecureVerifyDefault = false
)
type Config struct {
Timeout time.Duration
MaxIdleConnections uint16
MaxIdleConnectionsPerHost uint16
MaxConnectionsPerHost uint16
SecureVerify bool
}
func NewConfig() *Config {
return &Config{}
}