Hetzner SD: Implement set directory (#10813)

Makes path relative to Prometheus config file.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
Julien Pivotto 2022-06-05 07:54:43 +02:00 committed by GitHub
parent b11062bfcc
commit 143a760e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -115,6 +115,11 @@ func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
return c.HTTPClientConfig.Validate()
}
// SetDirectory joins any relative file paths with dir.
func (c *SDConfig) SetDirectory(dir string) {
c.HTTPClientConfig.SetDirectory(dir)
}
// Discovery periodically performs Hetzner requests. It implements
// the Discoverer interface.
type Discovery struct {