uyuni: Use default HTTP client and set relative paths (#10814)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
parent
eef02a0334
commit
e4a09f2b4b
|
@ -995,6 +995,7 @@ var expectedConf = &Config{
|
||||||
Entitlement: "monitoring_entitled",
|
Entitlement: "monitoring_entitled",
|
||||||
Separator: ",",
|
Separator: ",",
|
||||||
RefreshInterval: model.Duration(60 * time.Second),
|
RefreshInterval: model.Duration(60 * time.Second),
|
||||||
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -55,6 +55,7 @@ var DefaultSDConfig = SDConfig{
|
||||||
Entitlement: "monitoring_entitled",
|
Entitlement: "monitoring_entitled",
|
||||||
Separator: ",",
|
Separator: ",",
|
||||||
RefreshInterval: model.Duration(1 * time.Minute),
|
RefreshInterval: model.Duration(1 * time.Minute),
|
||||||
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -117,6 +118,11 @@ func (c *SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Di
|
||||||
return NewDiscovery(c, opts.Logger)
|
return NewDiscovery(c, opts.Logger)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetDirectory joins any relative file paths with dir.
|
||||||
|
func (c *SDConfig) SetDirectory(dir string) {
|
||||||
|
c.HTTPClientConfig.SetDirectory(dir)
|
||||||
|
}
|
||||||
|
|
||||||
// UnmarshalYAML implements the yaml.Unmarshaler interface.
|
// UnmarshalYAML implements the yaml.Unmarshaler interface.
|
||||||
func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
*c = DefaultSDConfig
|
*c = DefaultSDConfig
|
||||||
|
|
Loading…
Reference in New Issue