25 lines
656 B
Go
25 lines
656 B
Go
package admin
|
|
|
|
const (
|
|
// DefaultBindAddress is the default bind address for the HTTP server.
|
|
DefaultBindAddress = ":8083"
|
|
)
|
|
|
|
// Config represents the configuration for the admin service.
|
|
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:"-"`
|
|
}
|
|
|
|
// NewConfig returns an instance of Config with defaults.
|
|
func NewConfig() Config {
|
|
return Config{
|
|
BindAddress: DefaultBindAddress,
|
|
HTTPSEnabled: false,
|
|
HTTPSCertificate: "/etc/ssl/influxdb.pem",
|
|
}
|
|
}
|