udp

package
v0.0.0-...-b28dce8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package udp is a generated protocol buffer package.

It is generated from these files:

github.com/google/cloudprober/probes/udp/config.proto

It has these top-level messages:

ProbeConf

Package udp implements a UDP prober. It sends UDP queries to a list of targets and reports statistics on queries sent, queries received, and latency experienced.

Queries to each target are sent in parallel.

Index

Constants

View Source
const Default_ProbeConf_Port int32 = 31122
View Source
const Default_ProbeConf_StatsExportIntervalMsec int32 = 10000

Variables

This section is empty.

Functions

func Ping

func Ping(addr string, timeout time.Duration) (success bool, latency time.Duration, err error)

Ping sends a UDP "ping" to addr. Probe succeeds if the same data is returned within timeout. TODO: Hide this once b/32340835 is fixed, that is, once nobody using it anymore.

Types

type Probe

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

Probe holds aggregate information about all probe runs, per-target.

func (*Probe) Init

func (p *Probe) Init(name string, tgts targets.Targets, interval, timeout time.Duration, l *logger.Logger, v interface{}) 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.

type ProbeConf

type ProbeConf struct {
	// Export stats after these many milliseconds
	StatsExportIntervalMsec *int32 `` /* 138-byte string literal not displayed */
	// Port to send UDP Ping to (UDP Echo).  Should be same as
	// ProberConfig.udp_echo_server_port.
	// TODO: Can we just read this from ProberConfig?
	Port             *int32 `protobuf:"varint,3,opt,name=port,def=31122" json:"port,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*ProbeConf) Descriptor

func (*ProbeConf) Descriptor() ([]byte, []int)

func (*ProbeConf) GetPort

func (m *ProbeConf) GetPort() int32

func (*ProbeConf) GetStatsExportIntervalMsec

func (m *ProbeConf) GetStatsExportIntervalMsec() int32

func (*ProbeConf) ProtoMessage

func (*ProbeConf) ProtoMessage()

func (*ProbeConf) Reset

func (m *ProbeConf) Reset()

func (*ProbeConf) String

func (m *ProbeConf) String() string

Directories

Path Synopsis
Udp_bin implements a stand-alone udp prober binary using the cloudprober/probes/udp package.
Udp_bin implements a stand-alone udp prober binary using the cloudprober/probes/udp package.

Jump to

Keyboard shortcuts

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