proto

package
v0.11.3 Latest Latest
Warning

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: 10

Documentation

Index

Constants

View Source
const (
	Default_ProbeDef_IntervalMsec = int32(2000)
	Default_ProbeDef_TimeoutMsec  = int32(1000)
	Default_ProbeDef_LatencyUnit  = string("us")
)

Default values for ProbeDef fields.

Variables

View Source
var (
	ProbeDef_Type_name = map[int32]string{
		0:  "PING",
		1:  "HTTP",
		2:  "DNS",
		3:  "EXTERNAL",
		4:  "UDP",
		5:  "UDP_LISTENER",
		6:  "GRPC",
		98: "EXTENSION",
		99: "USER_DEFINED",
	}
	ProbeDef_Type_value = map[string]int32{
		"PING":         0,
		"HTTP":         1,
		"DNS":          2,
		"EXTERNAL":     3,
		"UDP":          4,
		"UDP_LISTENER": 5,
		"GRPC":         6,
		"EXTENSION":    98,
		"USER_DEFINED": 99,
	}
)

Enum value maps for ProbeDef_Type.

View Source
var (
	ProbeDef_IPVersion_name = map[int32]string{
		0: "IP_VERSION_UNSPECIFIED",
		1: "IPV4",
		2: "IPV6",
	}
	ProbeDef_IPVersion_value = map[string]int32{
		"IP_VERSION_UNSPECIFIED": 0,
		"IPV4":                   1,
		"IPV6":                   2,
	}
)

Enum value maps for ProbeDef_IPVersion.

View Source
var File_github_com_google_cloudprober_probes_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AdditionalLabel added in v0.10.5

type AdditionalLabel struct {
	Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	// Value can either be a static value or can be derived from target's labels.
	// To get value from target's labels, use target.labels.<target's label key>
	// as value.
	Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AdditionalLabel) Descriptor deprecated added in v0.10.5

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

Deprecated: Use AdditionalLabel.ProtoReflect.Descriptor instead.

func (*AdditionalLabel) GetKey added in v0.10.5

func (x *AdditionalLabel) GetKey() string

func (*AdditionalLabel) GetValue added in v0.10.5

func (x *AdditionalLabel) GetValue() string

func (*AdditionalLabel) ProtoMessage added in v0.10.5

func (*AdditionalLabel) ProtoMessage()

func (*AdditionalLabel) ProtoReflect added in v0.10.8

func (x *AdditionalLabel) ProtoReflect() protoreflect.Message

func (*AdditionalLabel) Reset added in v0.10.5

func (x *AdditionalLabel) Reset()

func (*AdditionalLabel) String added in v0.10.5

func (x *AdditionalLabel) String() string

type DebugOptions added in v0.10.2

type DebugOptions struct {

	// Whether to log metrics or not.
	LogMetrics *bool `protobuf:"varint,1,opt,name=log_metrics,json=logMetrics" json:"log_metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*DebugOptions) Descriptor deprecated added in v0.10.2

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

Deprecated: Use DebugOptions.ProtoReflect.Descriptor instead.

func (*DebugOptions) GetLogMetrics added in v0.10.2

func (x *DebugOptions) GetLogMetrics() bool

func (*DebugOptions) ProtoMessage added in v0.10.2

func (*DebugOptions) ProtoMessage()

func (*DebugOptions) ProtoReflect added in v0.10.8

func (x *DebugOptions) ProtoReflect() protoreflect.Message

func (*DebugOptions) Reset added in v0.10.2

func (x *DebugOptions) Reset()

func (*DebugOptions) String added in v0.10.2

func (x *DebugOptions) String() string

type ProbeDef

type ProbeDef struct {
	Name *string        `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Type *ProbeDef_Type `protobuf:"varint,2,req,name=type,enum=cloudprober.probes.ProbeDef_Type" json:"type,omitempty"`
	// Which machines this probe should run on. If defined, cloudprober will run
	// this probe only if machine's hostname matches this value.
	RunOn *string `protobuf:"bytes,3,opt,name=run_on,json=runOn" json:"run_on,omitempty"`
	// Interval between two probes
	IntervalMsec *int32 `protobuf:"varint,4,opt,name=interval_msec,json=intervalMsec,def=2000" json:"interval_msec,omitempty"`
	// Timeout for each probe
	TimeoutMsec *int32 `protobuf:"varint,5,opt,name=timeout_msec,json=timeoutMsec,def=1000" json:"timeout_msec,omitempty"`
	// Targets for the probe
	Targets *proto.TargetsDef `protobuf:"bytes,6,req,name=targets" json:"targets,omitempty"`
	// Latency distribution. If specified, latency is stored as a distribution.
	LatencyDistribution *proto1.Dist `protobuf:"bytes,7,opt,name=latency_distribution,json=latencyDistribution" json:"latency_distribution,omitempty"`
	// Latency unit. Any string that's parseable by time.ParseDuration.
	// Valid values: "ns", "us" (or "µs"), "ms", "s", "m", "h".
	LatencyUnit *string `protobuf:"bytes,8,opt,name=latency_unit,json=latencyUnit,def=us" json:"latency_unit,omitempty"`
	// Validators are in experimental phase right now and can change at any time.
	// NOTE: Only PING, HTTP and DNS probes support validators.
	Validator []*proto2.Validator `protobuf:"bytes,9,rep,name=validator" json:"validator,omitempty"`
	// Set the source IP to send packets from, either by providing an IP address
	// directly, or a network interface.
	//
	// Types that are assignable to SourceIpConfig:
	//	*ProbeDef_SourceIp
	//	*ProbeDef_SourceInterface
	SourceIpConfig isProbeDef_SourceIpConfig `protobuf_oneof:"source_ip_config"`
	IpVersion      *ProbeDef_IPVersion       `` /* 126-byte string literal not displayed */
	// How often to export stats. Probes usually run at a higher frequency (e.g.
	// every second); stats from individual probes are aggregated within
	// cloudprober until exported. In most cases, users don't need to change the
	// default.
	//
	// By default this field is set in the following way:
	// For all probes except UDP:
	//   stats_export_interval=max(interval, 10s)
	// For UDP:
	//   stats_export_interval=max(2*max(interval, timeout), 10s)
	StatsExportIntervalMsec *int32 `` /* 129-byte string literal not displayed */
	// Additional labels to add to the probe results. Label's value can either be
	// static or can be derived from target's labels.
	//
	// Example:
	//   additional_label {
	//     key: "src_zone"
	//     value: "{{.zone}}"
	//   }
	//   additional_label {
	//     key: "app"
	//     value: "@target.label.app@"
	//   }
	AdditionalLabel []*AdditionalLabel `protobuf:"bytes,14,rep,name=additional_label,json=additionalLabel" json:"additional_label,omitempty"`
	// Types that are assignable to Probe:
	//	*ProbeDef_PingProbe
	//	*ProbeDef_HttpProbe
	//	*ProbeDef_DnsProbe
	//	*ProbeDef_ExternalProbe
	//	*ProbeDef_UdpProbe
	//	*ProbeDef_UdpListenerProbe
	//	*ProbeDef_GrpcProbe
	//	*ProbeDef_UserDefinedProbe
	Probe        isProbeDef_Probe `protobuf_oneof:"probe"`
	DebugOptions *DebugOptions    `protobuf:"bytes,100,opt,name=debug_options,json=debugOptions" json:"debug_options,omitempty"`
	// contains filtered or unexported fields
}

func (*ProbeDef) Descriptor deprecated

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

Deprecated: Use ProbeDef.ProtoReflect.Descriptor instead.

func (*ProbeDef) ExtensionRangeArray deprecated

func (*ProbeDef) ExtensionRangeArray() []protoiface.ExtensionRangeV1

Deprecated: Use ProbeDef.ProtoReflect.Descriptor.ExtensionRanges instead.

func (*ProbeDef) GetAdditionalLabel added in v0.10.5

func (x *ProbeDef) GetAdditionalLabel() []*AdditionalLabel

func (*ProbeDef) GetDebugOptions added in v0.10.2

func (x *ProbeDef) GetDebugOptions() *DebugOptions

func (*ProbeDef) GetDnsProbe

func (x *ProbeDef) GetDnsProbe() *proto5.ProbeConf

func (*ProbeDef) GetExternalProbe

func (x *ProbeDef) GetExternalProbe() *proto6.ProbeConf

func (*ProbeDef) GetGrpcProbe added in v0.10.7

func (x *ProbeDef) GetGrpcProbe() *proto9.ProbeConf

func (*ProbeDef) GetHttpProbe

func (x *ProbeDef) GetHttpProbe() *proto4.ProbeConf

func (*ProbeDef) GetIntervalMsec

func (x *ProbeDef) GetIntervalMsec() int32

func (*ProbeDef) GetIpVersion added in v0.10.3

func (x *ProbeDef) GetIpVersion() ProbeDef_IPVersion

func (*ProbeDef) GetLatencyDistribution

func (x *ProbeDef) GetLatencyDistribution() *proto1.Dist

func (*ProbeDef) GetLatencyUnit

func (x *ProbeDef) GetLatencyUnit() string

func (*ProbeDef) GetName

func (x *ProbeDef) GetName() string

func (*ProbeDef) GetPingProbe

func (x *ProbeDef) GetPingProbe() *proto3.ProbeConf

func (*ProbeDef) GetProbe

func (m *ProbeDef) GetProbe() isProbeDef_Probe

func (*ProbeDef) GetRunOn

func (x *ProbeDef) GetRunOn() string

func (*ProbeDef) GetSourceInterface added in v0.10.2

func (x *ProbeDef) GetSourceInterface() string

func (*ProbeDef) GetSourceIp added in v0.10.2

func (x *ProbeDef) GetSourceIp() string

func (*ProbeDef) GetSourceIpConfig added in v0.10.2

func (m *ProbeDef) GetSourceIpConfig() isProbeDef_SourceIpConfig

func (*ProbeDef) GetStatsExportIntervalMsec added in v0.10.3

func (x *ProbeDef) GetStatsExportIntervalMsec() int32

func (*ProbeDef) GetTargets

func (x *ProbeDef) GetTargets() *proto.TargetsDef

func (*ProbeDef) GetTimeoutMsec

func (x *ProbeDef) GetTimeoutMsec() int32

func (*ProbeDef) GetType

func (x *ProbeDef) GetType() ProbeDef_Type

func (*ProbeDef) GetUdpListenerProbe

func (x *ProbeDef) GetUdpListenerProbe() *proto8.ProbeConf

func (*ProbeDef) GetUdpProbe

func (x *ProbeDef) GetUdpProbe() *proto7.ProbeConf

func (*ProbeDef) GetUserDefinedProbe

func (x *ProbeDef) GetUserDefinedProbe() string

func (*ProbeDef) GetValidator

func (x *ProbeDef) GetValidator() []*proto2.Validator

func (*ProbeDef) ProtoMessage

func (*ProbeDef) ProtoMessage()

func (*ProbeDef) ProtoReflect added in v0.10.8

func (x *ProbeDef) ProtoReflect() protoreflect.Message

func (*ProbeDef) Reset

func (x *ProbeDef) Reset()

func (*ProbeDef) String

func (x *ProbeDef) String() string

type ProbeDef_DnsProbe

type ProbeDef_DnsProbe struct {
	DnsProbe *proto5.ProbeConf `protobuf:"bytes,22,opt,name=dns_probe,json=dnsProbe,oneof"`
}

type ProbeDef_ExternalProbe

type ProbeDef_ExternalProbe struct {
	ExternalProbe *proto6.ProbeConf `protobuf:"bytes,23,opt,name=external_probe,json=externalProbe,oneof"`
}

type ProbeDef_GrpcProbe added in v0.10.7

type ProbeDef_GrpcProbe struct {
	GrpcProbe *proto9.ProbeConf `protobuf:"bytes,26,opt,name=grpc_probe,json=grpcProbe,oneof"`
}

type ProbeDef_HttpProbe

type ProbeDef_HttpProbe struct {
	HttpProbe *proto4.ProbeConf `protobuf:"bytes,21,opt,name=http_probe,json=httpProbe,oneof"`
}

type ProbeDef_IPVersion added in v0.10.3

type ProbeDef_IPVersion int32

IP version to use for networking probes. If specified, this is used at the time of resolving a target, picking the correct IP for the source IP if source_interface option is provided, and to craft the packet correctly for PING probes.

If ip_version is not configured but source_ip is provided, we get ip_version from it. If both are confgiured, an error is returned if there is a conflict between the two.

If left unspecified and both addresses are available in resolve call or on source interface, IPv4 is preferred. Future work: provide an option to prefer IPv4 and IPv6 explicitly.

const (
	ProbeDef_IP_VERSION_UNSPECIFIED ProbeDef_IPVersion = 0
	ProbeDef_IPV4                   ProbeDef_IPVersion = 1
	ProbeDef_IPV6                   ProbeDef_IPVersion = 2
)

func (ProbeDef_IPVersion) Descriptor added in v0.10.8

func (ProbeDef_IPVersion) Enum added in v0.10.3

func (ProbeDef_IPVersion) EnumDescriptor deprecated added in v0.10.3

func (ProbeDef_IPVersion) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProbeDef_IPVersion.Descriptor instead.

func (ProbeDef_IPVersion) Number added in v0.10.8

func (ProbeDef_IPVersion) String added in v0.10.3

func (x ProbeDef_IPVersion) String() string

func (ProbeDef_IPVersion) Type added in v0.10.8

func (*ProbeDef_IPVersion) UnmarshalJSON deprecated added in v0.10.3

func (x *ProbeDef_IPVersion) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type ProbeDef_PingProbe

type ProbeDef_PingProbe struct {
	PingProbe *proto3.ProbeConf `protobuf:"bytes,20,opt,name=ping_probe,json=pingProbe,oneof"`
}

type ProbeDef_SourceInterface added in v0.10.2

type ProbeDef_SourceInterface struct {
	SourceInterface string `protobuf:"bytes,11,opt,name=source_interface,json=sourceInterface,oneof"`
}

type ProbeDef_SourceIp added in v0.10.2

type ProbeDef_SourceIp struct {
	SourceIp string `protobuf:"bytes,10,opt,name=source_ip,json=sourceIp,oneof"`
}

type ProbeDef_Type

type ProbeDef_Type int32
const (
	ProbeDef_PING         ProbeDef_Type = 0
	ProbeDef_HTTP         ProbeDef_Type = 1
	ProbeDef_DNS          ProbeDef_Type = 2
	ProbeDef_EXTERNAL     ProbeDef_Type = 3
	ProbeDef_UDP          ProbeDef_Type = 4
	ProbeDef_UDP_LISTENER ProbeDef_Type = 5
	ProbeDef_GRPC         ProbeDef_Type = 6
	// One of the extension probe types. See "extensions" below for more
	// details.
	ProbeDef_EXTENSION ProbeDef_Type = 98
	// USER_DEFINED probe type is for a one off probe that you want to compile
	// into cloudprober, but you don't expect it to be reused. If you expect
	// it to be reused, you should consider adding it using the extensions
	// mechanism.
	ProbeDef_USER_DEFINED ProbeDef_Type = 99
)

func (ProbeDef_Type) Descriptor added in v0.10.8

func (ProbeDef_Type) Enum

func (x ProbeDef_Type) Enum() *ProbeDef_Type

func (ProbeDef_Type) EnumDescriptor deprecated

func (ProbeDef_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProbeDef_Type.Descriptor instead.

func (ProbeDef_Type) Number added in v0.10.8

func (ProbeDef_Type) String

func (x ProbeDef_Type) String() string

func (ProbeDef_Type) Type added in v0.10.8

func (*ProbeDef_Type) UnmarshalJSON deprecated

func (x *ProbeDef_Type) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type ProbeDef_UdpListenerProbe

type ProbeDef_UdpListenerProbe struct {
	UdpListenerProbe *proto8.ProbeConf `protobuf:"bytes,25,opt,name=udp_listener_probe,json=udpListenerProbe,oneof"`
}

type ProbeDef_UdpProbe

type ProbeDef_UdpProbe struct {
	UdpProbe *proto7.ProbeConf `protobuf:"bytes,24,opt,name=udp_probe,json=udpProbe,oneof"`
}

type ProbeDef_UserDefinedProbe

type ProbeDef_UserDefinedProbe struct {
	// This field's contents are passed on to the user defined probe, registered
	// for this probe's name through probes.RegisterUserDefined().
	UserDefinedProbe string `protobuf:"bytes,99,opt,name=user_defined_probe,json=userDefinedProbe,oneof"`
}

Jump to

Keyboard shortcuts

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