prober

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BasePort            uint16
	ConfiguredSrcAddr   net.IP
	SrcAddrs            []net.IP
	Hops                []Hop
	StaticLabels        []Label
	TOS                 TOS
	PPS                 uint64
	PayloadSizeBytes    uint64
	MeasurementLengthMS uint64
	TimeoutMS           uint64
}

Config is the configuration of a prober

type Hop

type Hop struct {
	Name     string
	DstRange []net.IP
	SrcRange []net.IP
}

Hop represents a hop on a path to be probed

type Label

type Label struct {
	Key   string
	Value string
}

type Prober

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

Prober keeps the state of a prober instance. There is one instance per probed path.

func New

func New(c Config) (*Prober, error)

New creates a new prober

func (*Prober) Collect

func (p *Prober) Collect(ch chan<- prometheus.Metric)

Collect collects data from the collector and send it to prometheus

func (*Prober) Describe

func (p *Prober) Describe(ch chan<- *prometheus.Desc)

Describe is required by prometheus interface

func (*Prober) Start

func (p *Prober) Start() error

Start starts the prober

func (*Prober) Stop

func (p *Prober) Stop()

Stop stops the prober

type TOS

type TOS struct {
	Name  string
	Value uint8
}

TOS represents a type of service mapping

Jump to

Keyboard shortcuts

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