-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.go
43 lines (36 loc) · 1.09 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
40
41
42
43
// Config is put into a different package to prevent cyclic imports in case
// it is needed in several locations
package config
import (
"time"
)
// Config options
type Config struct {
Host string `config:"host"`
Port int `config:"port"`
User string `config:"user"`
Password string `config:"password"`
SSL SSL `config:"ssl"`
Eventstream EventstreamConfig `config:"eventstream"`
Statuspoller StatuspollerConfig `config:"statuspoller"`
}
// SSL options
type SSL struct {
Verify bool `config:"verify"`
CertificateAuthorities []string `config:"certificate_authorities"`
}
// EventstreamConfig optoins
type EventstreamConfig struct {
Types []string `config:"types"`
Filter string `config:"filter"`
RetryInterval time.Duration `config:"retry_interval"`
}
// StatuspollerConfig options
type StatuspollerConfig struct {
Interval time.Duration `config:"interval"`
}
// DefaultConfig values
var DefaultConfig = Config{
Host: "localhost",
Port: 5665,
}