Documentation ¶
Overview ¶
Package udplistener is a generated protocol buffer package.
It is generated from these files:
github.com/google/cloudprober/probes/udplistener/config.proto
It has these top-level messages:
ProbeConf
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.
Notes:
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.
Index ¶
Constants ¶
const Default_ProbeConf_Port int32 = 32212
const Default_ProbeConf_StatsExportIntervalMsec int32 = 10000
Variables ¶
var ProbeConf_Type_name = map[int32]string{
0: "INVALID",
1: "ECHO",
2: "DISCARD",
}
var ProbeConf_Type_value = map[string]int32{
"INVALID": 0,
"ECHO": 1,
"DISCARD": 2,
}
Functions ¶
This section is empty.
Types ¶
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
Probe holds aggregate information about all probe runs.
type ProbeConf ¶
type ProbeConf struct { // Export stats after these many milliseconds StatsExportIntervalMsec *int32 `` /* 138-byte string literal not displayed */ // Port to listen. Port *int32 `protobuf:"varint,3,opt,name=port,def=32212" json:"port,omitempty"` Type *ProbeConf_Type `protobuf:"varint,4,opt,name=type,enum=cloudprober.probes.udplistener.ProbeConf_Type" json:"type,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*ProbeConf) Descriptor ¶
func (*ProbeConf) GetStatsExportIntervalMsec ¶
func (*ProbeConf) GetType ¶
func (m *ProbeConf) GetType() ProbeConf_Type
func (*ProbeConf) ProtoMessage ¶
func (*ProbeConf) ProtoMessage()
type ProbeConf_Type ¶
type ProbeConf_Type int32
Probe response to an incoming packet: echo back or discard.
const ( ProbeConf_INVALID ProbeConf_Type = 0 ProbeConf_ECHO ProbeConf_Type = 1 ProbeConf_DISCARD ProbeConf_Type = 2 )
func (ProbeConf_Type) Enum ¶
func (x ProbeConf_Type) Enum() *ProbeConf_Type
func (ProbeConf_Type) EnumDescriptor ¶
func (ProbeConf_Type) EnumDescriptor() ([]byte, []int)
func (ProbeConf_Type) String ¶
func (x ProbeConf_Type) String() string
func (*ProbeConf_Type) UnmarshalJSON ¶
func (x *ProbeConf_Type) UnmarshalJSON(data []byte) error