cloudprober: Index | Files | Directories

package udplistener

import ""

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.


Package Files


type Probe Uses

type Probe struct {
    // contains filtered or unexported fields

Probe holds aggregate information about all probe runs.

func (*Probe) Init Uses

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

Init initializes the probe with the given params.

func (*Probe) Start Uses

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

Start starts and runs the probe indefinitely.



Package udplistener imports 15 packages (graph) and is imported by 3 packages. Updated 2021-01-21. Refresh now. Tools for package owners.