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: 5 Imported by: 15

Documentation

Index

Constants

View Source
const (
	Default_ProbeConf_Mode            = ProbeConf_ONCE
	Default_ProbeConf_OutputAsMetrics = bool(true)
)

Default values for ProbeConf fields.

Variables

View Source
var (
	ProbeConf_Mode_name = map[int32]string{
		0: "ONCE",
		1: "SERVER",
	}
	ProbeConf_Mode_value = map[string]int32{
		"ONCE":   0,
		"SERVER": 1,
	}
)

Enum value maps for ProbeConf_Mode.

View Source
var File_github_com_google_cloudprober_probes_external_proto_config_proto protoreflect.FileDescriptor
View Source
var File_github_com_google_cloudprober_probes_external_proto_server_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ProbeConf

type ProbeConf struct {
	Mode *ProbeConf_Mode `protobuf:"varint,1,opt,name=mode,enum=cloudprober.probes.external.ProbeConf_Mode,def=0" json:"mode,omitempty"`
	// Command.  For ONCE probes, arguments are processed for the following field
	// substitutions:
	// @probe@    Name of the probe
	// @target@   Hostname of the target
	// @address@  IP address of the target
	//
	// For example, for target ig-us-central1-a, /tools/recreate_vm -vm @target@
	// will get converted to: /tools/recreate_vm -vm ig-us-central1-a
	Command *string             `protobuf:"bytes,2,req,name=command" json:"command,omitempty"`
	Options []*ProbeConf_Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
	// Export output as metrics, where output is the output returned by the
	// external probe process, over stdout for ONCE probes, and through ProbeReply
	// for SERVER probes. Cloudprober expects variables to be in the following
	// format in the output:
	// var1 value1 (for example: total_errors 589)
	OutputAsMetrics      *bool                       `protobuf:"varint,4,opt,name=output_as_metrics,json=outputAsMetrics,def=1" json:"output_as_metrics,omitempty"`
	OutputMetricsOptions *proto.OutputMetricsOptions `protobuf:"bytes,5,opt,name=output_metrics_options,json=outputMetricsOptions" json:"output_metrics_options,omitempty"`
	// contains filtered or unexported fields
}

func (*ProbeConf) Descriptor deprecated

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

Deprecated: Use ProbeConf.ProtoReflect.Descriptor instead.

func (*ProbeConf) GetCommand

func (x *ProbeConf) GetCommand() string

func (*ProbeConf) GetMode

func (x *ProbeConf) GetMode() ProbeConf_Mode

func (*ProbeConf) GetOptions

func (x *ProbeConf) GetOptions() []*ProbeConf_Option

func (*ProbeConf) GetOutputAsMetrics

func (x *ProbeConf) GetOutputAsMetrics() bool

func (*ProbeConf) GetOutputMetricsOptions

func (x *ProbeConf) GetOutputMetricsOptions() *proto.OutputMetricsOptions

func (*ProbeConf) ProtoMessage

func (*ProbeConf) ProtoMessage()

func (*ProbeConf) ProtoReflect added in v0.10.8

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

func (*ProbeConf) Reset

func (x *ProbeConf) Reset()

func (*ProbeConf) String

func (x *ProbeConf) String() string

type ProbeConf_Mode

type ProbeConf_Mode int32

External probes support two mode: ONCE and SERVER. In ONCE mode, external command is re-executed for each probe run, while in SERVER mode, command is run in server mode, re-executed only if not running already.

const (
	ProbeConf_ONCE   ProbeConf_Mode = 0
	ProbeConf_SERVER ProbeConf_Mode = 1
)

func (ProbeConf_Mode) Descriptor added in v0.10.8

func (ProbeConf_Mode) Enum

func (x ProbeConf_Mode) Enum() *ProbeConf_Mode

func (ProbeConf_Mode) EnumDescriptor deprecated

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

Deprecated: Use ProbeConf_Mode.Descriptor instead.

func (ProbeConf_Mode) Number added in v0.10.8

func (ProbeConf_Mode) String

func (x ProbeConf_Mode) String() string

func (ProbeConf_Mode) Type added in v0.10.8

func (*ProbeConf_Mode) UnmarshalJSON deprecated

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

Deprecated: Do not use.

type ProbeConf_Option

type ProbeConf_Option struct {
	Name  *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Options for the SERVER mode probe requests. These options are passed on to the external probe server as part of the ProbeRequest. Values are substituted similar to command arguments for the ONCE mode probes.

func (*ProbeConf_Option) Descriptor deprecated

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

Deprecated: Use ProbeConf_Option.ProtoReflect.Descriptor instead.

func (*ProbeConf_Option) GetName

func (x *ProbeConf_Option) GetName() string

func (*ProbeConf_Option) GetValue

func (x *ProbeConf_Option) GetValue() string

func (*ProbeConf_Option) ProtoMessage

func (*ProbeConf_Option) ProtoMessage()

func (*ProbeConf_Option) ProtoReflect added in v0.10.8

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

func (*ProbeConf_Option) Reset

func (x *ProbeConf_Option) Reset()

func (*ProbeConf_Option) String

func (x *ProbeConf_Option) String() string

type ProbeReply

type ProbeReply struct {

	// The sequence number for this request.
	RequestId *int32 `protobuf:"varint,1,req,name=request_id,json=requestId" json:"request_id,omitempty"`
	// For a normal result, this is not present.
	// If it is present, it indicates that the probe failed.
	ErrorMessage *string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage" json:"error_message,omitempty"`
	// The result of the probe. Cloudprober parses the payload to retrieve
	// variables from it. It expects variables in the following format:
	// var1 value1 (for example: total_errors 589)
	// TODO(manugarg): Add an option to export mapped variables, for example:
	// client-errors map:lang java:200 python:20 golang:3
	Payload *string `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

ProbeReply is the message that external probe server sends back to the cloudprober.

func (*ProbeReply) Descriptor deprecated

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

Deprecated: Use ProbeReply.ProtoReflect.Descriptor instead.

func (*ProbeReply) GetErrorMessage

func (x *ProbeReply) GetErrorMessage() string

func (*ProbeReply) GetPayload

func (x *ProbeReply) GetPayload() string

func (*ProbeReply) GetRequestId

func (x *ProbeReply) GetRequestId() int32

func (*ProbeReply) ProtoMessage

func (*ProbeReply) ProtoMessage()

func (*ProbeReply) ProtoReflect added in v0.10.8

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

func (*ProbeReply) Reset

func (x *ProbeReply) Reset()

func (*ProbeReply) String

func (x *ProbeReply) String() string

type ProbeRequest

type ProbeRequest struct {

	// The unique identifier for this request.  This is unique across
	// an execution of the probe server.  It starts at 1.
	RequestId *int32 `protobuf:"varint,1,req,name=request_id,json=requestId" json:"request_id,omitempty"`
	// How long to allow for the execution of this request, in
	// milliseconds.  If the time limit is exceeded, the server
	// should abort the request, but *not* send back a reply.  The
	// client will have to do timeouts anyway.
	TimeLimit *int32                 `protobuf:"varint,2,req,name=time_limit,json=timeLimit" json:"time_limit,omitempty"`
	Options   []*ProbeRequest_Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
	// contains filtered or unexported fields
}

ProbeRequest is the message that cloudprober sends to the external probe server.

func (*ProbeRequest) Descriptor deprecated

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

Deprecated: Use ProbeRequest.ProtoReflect.Descriptor instead.

func (*ProbeRequest) GetOptions

func (x *ProbeRequest) GetOptions() []*ProbeRequest_Option

func (*ProbeRequest) GetRequestId

func (x *ProbeRequest) GetRequestId() int32

func (*ProbeRequest) GetTimeLimit

func (x *ProbeRequest) GetTimeLimit() int32

func (*ProbeRequest) ProtoMessage

func (*ProbeRequest) ProtoMessage()

func (*ProbeRequest) ProtoReflect added in v0.10.8

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

func (*ProbeRequest) Reset

func (x *ProbeRequest) Reset()

func (*ProbeRequest) String

func (x *ProbeRequest) String() string

type ProbeRequest_Option

type ProbeRequest_Option struct {
	Name  *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ProbeRequest_Option) Descriptor deprecated

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

Deprecated: Use ProbeRequest_Option.ProtoReflect.Descriptor instead.

func (*ProbeRequest_Option) GetName

func (x *ProbeRequest_Option) GetName() string

func (*ProbeRequest_Option) GetValue

func (x *ProbeRequest_Option) GetValue() string

func (*ProbeRequest_Option) ProtoMessage

func (*ProbeRequest_Option) ProtoMessage()

func (*ProbeRequest_Option) ProtoReflect added in v0.10.8

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

func (*ProbeRequest_Option) Reset

func (x *ProbeRequest_Option) Reset()

func (*ProbeRequest_Option) String

func (x *ProbeRequest_Option) String() string

Jump to

Keyboard shortcuts

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