netgear

package
v0.0.0-...-073d061 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInterface

func GetInterface(name string) (*net.Interface, error)

func GetInterfaceIPAddr

func GetInterfaceIPAddr(iface *net.Interface) (string, error)

func GetUDP

func GetUDP(host, port string) (*net.UDPAddr, error)

func Validate

func Validate(cnf *Config)

Types

type Config

type Config struct {
	Interval int `json:"interval"`
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(ctx context.Context, logger logger.ILogger, config *Config) *Exporter

func (*Exporter) Interval

func (e *Exporter) Interval() int

func (*Exporter) Scrape

func (e *Exporter) Scrape() error

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) AddSwitch

func (m *Metrics) AddSwitch(key string)

func (*Metrics) GetSwitch

func (m *Metrics) GetSwitch(key string) *SwitchMetrics

func (*Metrics) HasSwitch

func (m *Metrics) HasSwitch(key string) bool

func (*Metrics) Keys

func (m *Metrics) Keys() []string

type NsdpValues

type NsdpValues map[string]interface{}

type SwitchMetrics

type SwitchMetrics struct {
	Metric map[string]prometheus.Gauge
}

func NewSwitchMetrics

func NewSwitchMetrics() *SwitchMetrics

func (*SwitchMetrics) AddMetric

func (sm *SwitchMetrics) AddMetric(name, help, pretty string)

func (*SwitchMetrics) AddPortMetric

func (sm *SwitchMetrics) AddPortMetric(name, help, pretty string, port int)

func (*SwitchMetrics) SetMetric

func (sm *SwitchMetrics) SetMetric(name string, value uint64)

func (*SwitchMetrics) SetPortMetric

func (sm *SwitchMetrics) SetPortMetric(name string, port int, value uint64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL