influxdb/services/httpd/config.go

28 lines
824 B
Go
Raw Normal View History

2015-05-29 19:50:05 +00:00
package httpd
2016-02-25 11:17:59 +00:00
// DefaultBindAddress is the default address to bind to.
const DefaultBindAddress = ":8086"
// Config represents a configuration for a HTTP service.
2015-05-29 19:50:05 +00:00
type Config struct {
2015-07-17 23:54:06 +00:00
Enabled bool `toml:"enabled"`
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"`
2015-05-29 19:50:05 +00:00
}
// NewConfig returns a new Config with default settings.
2015-05-29 19:50:05 +00:00
func NewConfig() Config {
return Config{
2015-07-17 23:54:06 +00:00
Enabled: true,
BindAddress: ":8086",
LogEnabled: true,
HTTPSEnabled: false,
HTTPSCertificate: "/etc/ssl/influxdb.pem",
2015-05-29 19:50:05 +00:00
}
}