forked from influxdata/kapacitor
/
config.go
31 lines (26 loc) · 803 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
30
31
package httpd
import (
"time"
"github.com/influxdata/influxdb/toml"
)
const (
DefaultShutdownTimeout = toml.Duration(time.Second * 10)
)
type Config struct {
BindAddress string `toml:"bind-address"`
AuthEnabled bool `toml:"auth-enabled"`
LogEnabled bool `toml:"log-enabled"`
WriteTracing bool `toml:"write-tracing"`
PprofEnabled bool `toml:"pprof-enabled"`
HttpsEnabled bool `toml:"https-enabled"`
HttpsCertificate string `toml:"https-certificate"`
ShutdownTimeout toml.Duration `toml:"shutdown-timeout"`
}
func NewConfig() Config {
return Config{
BindAddress: ":9092",
LogEnabled: true,
HttpsCertificate: "/etc/ssl/kapacitor.pem",
ShutdownTimeout: DefaultShutdownTimeout,
}
}