influxdb/services/admin/config.go

25 lines
656 B
Go
Raw Normal View History

2015-05-29 19:50:05 +00:00
package admin
2015-05-30 20:00:46 +00:00
const (
// DefaultBindAddress is the default bind address for the HTTP server.
DefaultBindAddress = ":8083"
)
// Config represents the configuration for the admin service.
2015-05-30 20:00:46 +00:00
type Config struct {
Enabled bool `toml:"enabled"`
BindAddress string `toml:"bind-address"`
HTTPSEnabled bool `toml:"https-enabled"`
HTTPSCertificate string `toml:"https-certificate"`
Version string `toml:"-"`
2015-05-30 20:00:46 +00:00
}
// NewConfig returns an instance of Config with defaults.
2015-05-30 20:00:46 +00:00
func NewConfig() Config {
return Config{
BindAddress: DefaultBindAddress,
HTTPSEnabled: false,
HTTPSCertificate: "/etc/ssl/influxdb.pem",
2015-05-30 20:00:46 +00:00
}
}