Version: v0.11.3 Latest Latest

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 15 Imported by: 4



Package udplistener implements a UDP listener. Given a target list, it listens for packets from each of the targets and reports number of packets successfully received in order, lost or delayed. It also uses the probe interval as an indicator for the number of packets we expect from each target. Use the "udp" probe as the counterpart with the same targets list and probe interval as the sender.


Each probe has 3 goroutines: - A recvLoop that keeps handling incoming packets and updates metrics. - An outputLoop that ticks twice every statsExportInterval and outputs metrics. - An echoLoop that receives incoming packets from recvLoop over a channel and

echos back the packets.

- Targets list determines which packet sources are valid sources. It is

updated in the outputLoop routine.

- We use the probe interval to determine the estimated number of packets that

  should be received. This number is the lower bound of the total number of
	packets "sent" by each source.



This section is empty.


This section is empty.


This section is empty.


type Probe

type Probe struct {
	// contains filtered or unexported fields

Probe holds aggregate information about all probe runs.

func (*Probe) Init

func (p *Probe) Init(name string, opts *options.Options) error

Init initializes the probe with the given params.

func (*Probe) Start

func (p *Probe) Start(ctx context.Context, dataChan chan *metrics.EventMetrics)

Start starts and runs the probe indefinitely.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

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