forked from startreedata/pinot-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
39 lines (30 loc) · 1.04 KB
/
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
package pinot
import "time"
// ClientConfig configs to create a PinotDbConnection
type ClientConfig struct {
// Additional HTTP headers to include in broker query API requests
ExtraHTTPHeader map[string]string
// HTTP request timeout in your broker query for API requests
HTTPTimeout time.Duration
// Zookeeper Configs
ZkConfig *ZookeeperConfig
// BrokerList
BrokerList []string
// Controller Config
ControllerConfig *ControllerConfig
}
// ZookeeperConfig describes how to config Pinot Zookeeper connection
type ZookeeperConfig struct {
ZookeeperPath []string
PathPrefix string
SessionTimeoutSec int
}
// ControllerConfig describes connection of a controller-based selector that
// periodically fetches table-to-broker mapping via the controller API
type ControllerConfig struct {
ControllerAddress string
// Frequency of broker data refresh in milliseconds via controller API - defaults to 1000ms
UpdateFreqMs int
// Additional HTTP headers to include in the controller API request
ExtraControllerAPIHeaders map[string]string
}