func (e *Exporters) SetVTYSHSudo(enable bool) {
	vtyshSudo = enable
}
SetVTYSHSudo sets the first command to execute vtysh if sudo is enabled.
package collector
import (
	"sync"
	"time"
	"github.com/go-kit/log"
	"github.com/go-kit/log/level"
	"github.com/prometheus/client_golang/prometheus"
)
const metric_namespace = "frr"
var (
	frrTotalScrapeCount = 0.0
	frrLabels           = []string{"collector"}
	frrDesc             = map[string]*prometheus.Desc{
		"frrScrapesTotal":   promDesc("scrapes_total", "Total number of times FRR has been scraped.", nil),
		"frrScrapeErrTotal": promDesc("scrape_errors_total", "Total number of errors from a collector.", frrLabels),
		"frrScrapeDuration": promDesc("scrape_duration_seconds", "Time it took for a collector's scrape to complete.", frrLabels),
		"frrCollectorUp":    promDesc("collector_up", "Whether the collector's last scrape was successful (1 = successful, 0 = unsuccessful).", frrLabels),
		"frrUp":             promDesc("up", "Whether FRR is currently up.", nil),
	}
	vtyshPath       string
	vtyshTimeout    time.Duration
	vtyshSudo       bool
	frrVTYSHOptions string
)
type CLIHelper interface {
	Help() string
	Name() string
	EnabledByDefault() bool
}
type CollectErrors interface {
	CollectErrors() []error
	CollectTotalErrors() float64
}
type Exporters struct {
	Collectors []*Collector
}
type Collector struct {
	Enabled       *bool
	Name          string
	PromCollector prometheus.Collector
	Errors        CollectErrors
	CLIHelper     CLIHelper
	Logger        log.Logger
}
func NewExporter(collectors []*Collector) *Exporters {
	return &Exporters{Collectors: collectors}
}
func (e *Exporters) SetVTYSHPath(path string) {
	vtyshPath = path
}
func (e *Exporters) SetVTYSHTimeout(timeout time.Duration) {
	vtyshTimeout = timeout
}
func (e *Exporters) SetVTYSHOptions(s string) {
	frrVTYSHOptions = s
}