mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
controller config defaults
This commit is contained in:
parent
63edd0ed48
commit
7324c01fe8
@ -59,10 +59,14 @@ type InfluxConfig struct {
|
|||||||
Token string `cf:"+secret"`
|
Token string `cf:"+secret"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig(path string) (*Config, error) {
|
func DefaultConfig() *Config {
|
||||||
cfg := &Config{
|
return &Config{
|
||||||
Metrics: &MetricsConfig{ServiceName: "metrics"},
|
Metrics: &MetricsConfig{ServiceName: "metrics"},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func LoadConfig(path string) (*Config, error) {
|
||||||
|
cfg := DefaultConfig()
|
||||||
if err := cf.BindYaml(cfg, path, cf.DefaultOptions()); err != nil {
|
if err := cf.BindYaml(cfg, path, cf.DefaultOptions()); err != nil {
|
||||||
return nil, errors.Wrapf(err, "error loading controller config '%v'", path)
|
return nil, errors.Wrapf(err, "error loading controller config '%v'", path)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user