tccollector

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNetlinkConn

func GetNetlinkConn(ns string) (con *rtnetlink.Conn, err error)

GetNetlinkConn gets a rtnetlink connection for the specified network namespace

func GetTcConn

func GetTcConn(ns string) (sock *tc.Tc, err error)

GetTcConn gets a TC connection for the specifed network namespace

func HandleStr

func HandleStr(handle uint32) (uint32, uint32)

HandleStr is a simple helper function that cinstruct human readable handles

func NewClassCollector

func NewClassCollector(netns map[string][]rtnetlink.LinkMessage, clog *slog.Logger) (prometheus.Collector, error)

NewClassCollector create a new ClassCollector given a network interface

func NewQdiscCollector

func NewQdiscCollector(netns map[string][]rtnetlink.LinkMessage, qlog *slog.Logger) (prometheus.Collector, error)

NewQdiscCollector create a new QdiscCollector given a network interface

func NewServiceCurveCollector

func NewServiceCurveCollector(netns map[string][]rtnetlink.LinkMessage, sclog *slog.Logger) (prometheus.Collector, error)

NewServiceCurveCollector create a new ServiceCurveCollector given a network interface

func NewTcCollector

func NewTcCollector(netns map[string][]rtnetlink.LinkMessage, logger *slog.Logger) (prometheus.Collector, error)

NewTcCollector create a new TcCollector given a network interface

Types

type ClassCollector

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

ClassCollector is the object that will collect Class data for the interface It is a basic reperesentation of the Stats and Stats2 struct of iproute

func (*ClassCollector) Collect

func (cc *ClassCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches and updates the data the collector is exporting

func (*ClassCollector) Describe

func (cc *ClassCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector

type QdiscCollector

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

QdiscCollector is the object that will collect Qdisc data for the interface

func (*QdiscCollector) Collect

func (qc *QdiscCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches and updates the data the collector is exporting

func (*QdiscCollector) Describe

func (qc *QdiscCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector

type ServiceCurveCollector

type ServiceCurveCollector struct {
	Burst *prometheus.Desc
	Delay *prometheus.Desc
	Rate  *prometheus.Desc
	Mutex *sync.Mutex
	// contains filtered or unexported fields
}

ServiceCurveCollector is the object that will collect Service Curve data for the interface. It is mainly used to determine the current limits imposed by the service curve

func (*ServiceCurveCollector) Collect

func (c *ServiceCurveCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches and updates the data the collector is exporting

func (*ServiceCurveCollector) Describe

func (c *ServiceCurveCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector

type TcCollector

type TcCollector struct {
	Collectors []prometheus.Collector
	// contains filtered or unexported fields
}

TcCollector is the object that will collect TC data for the interface

func (TcCollector) Collect

func (t TcCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches and updates the data the collector is exporting

func (TcCollector) Describe

func (t TcCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector

Jump to

Keyboard shortcuts

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