[GO][EDIT] moved tls option to Features and renamed it to TLS
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
// Config represents the configuration for the exporter
|
// Config represents the configuration for the exporter
|
||||||
type Config struct {
|
type Config struct {
|
||||||
tls bool `yaml:"tls,omitempty"`
|
|
||||||
Devices []Device `yaml:"devices"`
|
Devices []Device `yaml:"devices"`
|
||||||
Features struct {
|
Features struct {
|
||||||
|
TLS bool `yaml:"tls,omitempty"`
|
||||||
BGP bool `yaml:"bgp,omitempty"`
|
BGP bool `yaml:"bgp,omitempty"`
|
||||||
DHCP bool `yaml:"dhcp,omitempty"`
|
DHCP bool `yaml:"dhcp,omitempty"`
|
||||||
DHCPL bool `yaml:"dhcpl,omitempty"`
|
DHCPL bool `yaml:"dhcpl,omitempty"`
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -245,7 +245,7 @@ func collectorOptions() []collector.Option {
|
|||||||
opts = append(opts, collector.WithTimeout(*timeout))
|
opts = append(opts, collector.WithTimeout(*timeout))
|
||||||
}
|
}
|
||||||
|
|
||||||
if *tls || cfg.tls {
|
if *tls || cfg.Features.TLS {
|
||||||
fmt.Printf("TLS activated\n");
|
fmt.Printf("TLS activated\n");
|
||||||
opts = append(opts, collector.WithTLS(*insecure))
|
opts = append(opts, collector.WithTLS(*insecure))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user