poller

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const InterfaceHomeLanMbitsMinDelay = 30 * time.Second

InterfaceHomeLanMbitsMinDelay set the minimum delay between each poll. Polling must only be done once every 30 seconds as Livebox updates data only every 30 seconds.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceHomeLanMbits

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

InterfaceHomeLanMbits is an experimental poller to get the current bandwidth usage on the Livebox interfaces.

func NewInterfaceHomeLanMbits

func NewInterfaceHomeLanMbits(client *livebox.Client, interfaces []*exporterLivebox.Interface) *InterfaceHomeLanMbits

NewInterfaceHomeLanMbits returns a new InterfaceMbits poller.

func (*InterfaceHomeLanMbits) Collectors

func (im *InterfaceHomeLanMbits) Collectors() []prometheus.Collector

Collectors returns all metrics.

func (*InterfaceHomeLanMbits) Poll

Poll polls the current bandwidth usage.

type InterfaceMbits

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

InterfaceMbits allows to poll the current bandwidth usage on the Livebox interfaces.

func NewInterfaceMbits

func NewInterfaceMbits(client *livebox.Client) *InterfaceMbits

NewInterfaceMbits returns a new InterfaceMbits poller.

func (*InterfaceMbits) Collectors

func (im *InterfaceMbits) Collectors() []prometheus.Collector

Collectors returns all metrics.

func (*InterfaceMbits) Poll

func (im *InterfaceMbits) Poll(ctx context.Context) error

Poll polls the current bandwidth usage.

type InterfaceNetDevMbits

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

InterfaceNetDevMbits is an experimental poller to get the current bandwidth usage on the Livebox interfaces.

func NewInterfaceNetDevMbits

func NewInterfaceNetDevMbits(client *livebox.Client, interfaces []*exporterLivebox.Interface) *InterfaceNetDevMbits

NewInterfaceNetDevMbits returns a new InterfaceNetDevMbits poller.

func (*InterfaceNetDevMbits) Collectors

func (im *InterfaceNetDevMbits) Collectors() []prometheus.Collector

Collectors returns all metrics.

func (*InterfaceNetDevMbits) Poll

func (im *InterfaceNetDevMbits) Poll(ctx context.Context) error

Poll polls the current bandwidth usage.

type Poller

type Poller interface {
	Poll(ctx context.Context) error
	Collectors() []prometheus.Collector
}

Poller is an interface that allows polling a system and updating Prometheus metrics.

type Pollers

type Pollers []Poller

Pollers is a list of pollers.

func (Pollers) Collectors

func (p Pollers) Collectors() (c []prometheus.Collector)

Collectors returns the collectors of all pollers.

func (Pollers) Poll

func (p Pollers) Poll(ctx context.Context) error

Poll runs all pollers in parallel.

type WANMbits

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

WANMbits is an experimental poller to get the current bandwidth usage on the WAN interface of the Livebox.

func NewWANMbits

func NewWANMbits(client *livebox.Client) *WANMbits

NewWANMbits returns a new WANMbits poller.

func (*WANMbits) Collectors

func (im *WANMbits) Collectors() []prometheus.Collector

Collectors returns all metrics.

func (*WANMbits) Poll

func (im *WANMbits) Poll(ctx context.Context) error

Poll polls the current bandwidth usage on the WAN interface.

Jump to

Keyboard shortcuts

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