Documentation ¶
Overview ¶
Package udp is a generated protocol buffer package.
It is generated from these files:
github.com/google/cloudprober/servers/udp/config.proto
It has these top-level messages:
ServerConf
Package udp implements a UDP server. It listens on a given port and echos whatever it receives. This is used for the UDP probe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerConf_Type_name = map[int32]string{
0: "ECHO",
1: "DISCARD",
}
View Source
var ServerConf_Type_value = map[string]int32{
"ECHO": 0,
"DISCARD": 1,
}
Functions ¶
func ListenAndServe ¶
ListenAndServe launches an UDP echo server listening on the configured port. This function returns only in case of an error.
Types ¶
type ServerConf ¶
type ServerConf struct { Port *int32 `protobuf:"varint,1,req,name=port" json:"port,omitempty"` Type *ServerConf_Type `protobuf:"varint,2,req,name=type,enum=cloudprober.servers.udp.ServerConf_Type" json:"type,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*ServerConf) Descriptor ¶
func (*ServerConf) Descriptor() ([]byte, []int)
func (*ServerConf) GetPort ¶
func (m *ServerConf) GetPort() int32
func (*ServerConf) GetType ¶
func (m *ServerConf) GetType() ServerConf_Type
func (*ServerConf) ProtoMessage ¶
func (*ServerConf) ProtoMessage()
func (*ServerConf) Reset ¶
func (m *ServerConf) Reset()
func (*ServerConf) String ¶
func (m *ServerConf) String() string
type ServerConf_Type ¶
type ServerConf_Type int32
const ( // Echos the incoming packet back. // Note that UDP echo server limits reads to 4098 bytes. For messages longer // than 4098 bytes it won't work as expected. ServerConf_ECHO ServerConf_Type = 0 // Discard the incoming packet. Return nothing. ServerConf_DISCARD ServerConf_Type = 1 )
func (ServerConf_Type) Enum ¶
func (x ServerConf_Type) Enum() *ServerConf_Type
func (ServerConf_Type) EnumDescriptor ¶
func (ServerConf_Type) EnumDescriptor() ([]byte, []int)
func (ServerConf_Type) String ¶
func (x ServerConf_Type) String() string
func (*ServerConf_Type) UnmarshalJSON ¶
func (x *ServerConf_Type) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.