-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathcolumnaragent_config.go
69 lines (54 loc) · 2.05 KB
/
columnaragent_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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package gocbcore
import (
"crypto/tls"
"crypto/x509"
"time"
)
// ColumnarAgentConfig specifies the configuration options for creation of an ColumnarAgent.
type ColumnarAgentConfig struct {
UserAgent string
ConnectTimeout time.Duration
SeedConfig ColumnarSeedConfig
SecurityConfig ColumnarSecurityConfig
ConfigPollerConfig ColumnarConfigPollerConfig
KVConfig ColumnarKVConfig
HTTPConfig ColumnarHTTPConfig
}
// ColumnarSeedConfig specifies initial seed configuration options such as addresses.
type ColumnarSeedConfig struct {
MemdAddrs []string
SRVRecord *SRVRecord
}
// ColumnarSecurityConfig specifies options for controlling security related
// items such as TLS root certificates and verification skipping.
type ColumnarSecurityConfig struct {
TLSRootCAProvider func() *x509.CertPool
CipherSuite []*tls.CipherSuite
Auth AuthProvider
}
// ColumnarConfigPollerConfig specifies options for controlling the cluster configuration pollers.
type ColumnarConfigPollerConfig struct {
CccpMaxWait time.Duration
CccpPollPeriod time.Duration
}
// ColumnarKVConfig specifies kv related configuration options.
type ColumnarKVConfig struct {
// ConnectTimeout is the timeout value to apply when dialling tcp connections.
ConnectTimeout time.Duration
// ServerWaitBackoff is the period of time that the SDK will wait before reattempting connection to a node after
// bootstrap fails against that node.
ServerWaitBackoff time.Duration
ConnectionBufferSize uint
}
// ColumnarHTTPConfig specifies http related configuration options.
type ColumnarHTTPConfig struct {
// MaxIdleConns controls the maximum number of idle (keep-alive) connections across all hosts.
MaxIdleConns int
// MaxIdleConnsPerHost controls the maximum idle (keep-alive) connections to keep per-host.
MaxIdleConnsPerHost int
// MaxConnsPerHost controls the maximum number of connections to keep per-host.
MaxConnsPerHost int
// IdleConnTimeout is the maximum amount of time an idle (keep-alive) connection will remain idle before closing
// itself.
IdleConnectionTimeout time.Duration
}