forked from couchbase/gocbcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
httpclientmux.go
59 lines (48 loc) · 1.41 KB
/
httpclientmux.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
package gocbcore
type httpClientMuxEndpoints struct {
capiEpList []routeEndpoint
mgmtEpList []routeEndpoint
n1qlEpList []routeEndpoint
ftsEpList []routeEndpoint
cbasEpList []routeEndpoint
eventingEpList []routeEndpoint
gsiEpList []routeEndpoint
backupEpList []routeEndpoint
}
type httpClientMux struct {
capiEpList []routeEndpoint
mgmtEpList []routeEndpoint
n1qlEpList []routeEndpoint
ftsEpList []routeEndpoint
cbasEpList []routeEndpoint
eventingEpList []routeEndpoint
gsiEpList []routeEndpoint
backupEpList []routeEndpoint
bucket string
uuid string
revID int64
breakerCfg CircuitBreakerConfig
srcConfig routeConfig
tlsConfig *dynTLSConfig
auth AuthProvider
}
func newHTTPClientMux(cfg *routeConfig, endpoints httpClientMuxEndpoints, tlsConfig *dynTLSConfig, auth AuthProvider,
breakerCfg CircuitBreakerConfig) *httpClientMux {
return &httpClientMux{
capiEpList: endpoints.capiEpList,
mgmtEpList: endpoints.mgmtEpList,
n1qlEpList: endpoints.n1qlEpList,
ftsEpList: endpoints.ftsEpList,
cbasEpList: endpoints.cbasEpList,
eventingEpList: endpoints.eventingEpList,
gsiEpList: endpoints.gsiEpList,
backupEpList: endpoints.backupEpList,
bucket: cfg.name,
uuid: cfg.uuid,
revID: cfg.revID,
breakerCfg: breakerCfg,
srcConfig: *cfg,
tlsConfig: tlsConfig,
auth: auth,
}
}