proto

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 15

Documentation

Index

Constants

View Source
const Default_ProbeConf_OutputAsMetrics bool = true

Variables

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

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 *proto1.OutputMetricsOptions `protobuf:"bytes,5,opt,name=output_metrics_options,json=outputMetricsOptions" json:"output_metrics_options,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*ProbeConf) Descriptor

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

func (*ProbeConf) GetCommand

func (m *ProbeConf) GetCommand() string

func (*ProbeConf) GetMode

func (m *ProbeConf) GetMode() ProbeConf_Mode

func (*ProbeConf) GetOptions

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

func (*ProbeConf) GetOutputAsMetrics

func (m *ProbeConf) GetOutputAsMetrics() bool

func (*ProbeConf) GetOutputMetricsOptions

func (m *ProbeConf) GetOutputMetricsOptions() *proto1.OutputMetricsOptions

func (*ProbeConf) ProtoMessage

func (*ProbeConf) ProtoMessage()

func (*ProbeConf) Reset

func (m *ProbeConf) Reset()

func (*ProbeConf) String

func (m *ProbeConf) String() string

func (*ProbeConf) XXX_DiscardUnknown

func (m *ProbeConf) XXX_DiscardUnknown()

func (*ProbeConf) XXX_Marshal

func (m *ProbeConf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProbeConf) XXX_Merge

func (m *ProbeConf) XXX_Merge(src proto.Message)

func (*ProbeConf) XXX_Size

func (m *ProbeConf) XXX_Size() int

func (*ProbeConf) XXX_Unmarshal

func (m *ProbeConf) XXX_Unmarshal(b []byte) error

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
)
const Default_ProbeConf_Mode ProbeConf_Mode = ProbeConf_ONCE

func (ProbeConf_Mode) Enum

func (x ProbeConf_Mode) Enum() *ProbeConf_Mode

func (ProbeConf_Mode) EnumDescriptor

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

func (ProbeConf_Mode) String

func (x ProbeConf_Mode) String() string

func (*ProbeConf_Mode) UnmarshalJSON

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

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

func (*ProbeConf_Option) GetName

func (m *ProbeConf_Option) GetName() string

func (*ProbeConf_Option) GetValue

func (m *ProbeConf_Option) GetValue() string

func (*ProbeConf_Option) ProtoMessage

func (*ProbeConf_Option) ProtoMessage()

func (*ProbeConf_Option) Reset

func (m *ProbeConf_Option) Reset()

func (*ProbeConf_Option) String

func (m *ProbeConf_Option) String() string

func (*ProbeConf_Option) XXX_DiscardUnknown

func (m *ProbeConf_Option) XXX_DiscardUnknown()

func (*ProbeConf_Option) XXX_Marshal

func (m *ProbeConf_Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProbeConf_Option) XXX_Merge

func (m *ProbeConf_Option) XXX_Merge(src proto.Message)

func (*ProbeConf_Option) XXX_Size

func (m *ProbeConf_Option) XXX_Size() int

func (*ProbeConf_Option) XXX_Unmarshal

func (m *ProbeConf_Option) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*ProbeReply) Descriptor

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

func (*ProbeReply) GetErrorMessage

func (m *ProbeReply) GetErrorMessage() string

func (*ProbeReply) GetPayload

func (m *ProbeReply) GetPayload() string

func (*ProbeReply) GetRequestId

func (m *ProbeReply) GetRequestId() int32

func (*ProbeReply) ProtoMessage

func (*ProbeReply) ProtoMessage()

func (*ProbeReply) Reset

func (m *ProbeReply) Reset()

func (*ProbeReply) String

func (m *ProbeReply) String() string

func (*ProbeReply) XXX_DiscardUnknown

func (m *ProbeReply) XXX_DiscardUnknown()

func (*ProbeReply) XXX_Marshal

func (m *ProbeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProbeReply) XXX_Merge

func (m *ProbeReply) XXX_Merge(src proto.Message)

func (*ProbeReply) XXX_Size

func (m *ProbeReply) XXX_Size() int

func (*ProbeReply) XXX_Unmarshal

func (m *ProbeReply) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

func (*ProbeRequest) Descriptor

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

func (*ProbeRequest) GetOptions

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

func (*ProbeRequest) GetRequestId

func (m *ProbeRequest) GetRequestId() int32

func (*ProbeRequest) GetTimeLimit

func (m *ProbeRequest) GetTimeLimit() int32

func (*ProbeRequest) ProtoMessage

func (*ProbeRequest) ProtoMessage()

func (*ProbeRequest) Reset

func (m *ProbeRequest) Reset()

func (*ProbeRequest) String

func (m *ProbeRequest) String() string

func (*ProbeRequest) XXX_DiscardUnknown

func (m *ProbeRequest) XXX_DiscardUnknown()

func (*ProbeRequest) XXX_Marshal

func (m *ProbeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProbeRequest) XXX_Merge

func (m *ProbeRequest) XXX_Merge(src proto.Message)

func (*ProbeRequest) XXX_Size

func (m *ProbeRequest) XXX_Size() int

func (*ProbeRequest) XXX_Unmarshal

func (m *ProbeRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProbeRequest_Option) Descriptor

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

func (*ProbeRequest_Option) GetName

func (m *ProbeRequest_Option) GetName() string

func (*ProbeRequest_Option) GetValue

func (m *ProbeRequest_Option) GetValue() string

func (*ProbeRequest_Option) ProtoMessage

func (*ProbeRequest_Option) ProtoMessage()

func (*ProbeRequest_Option) Reset

func (m *ProbeRequest_Option) Reset()

func (*ProbeRequest_Option) String

func (m *ProbeRequest_Option) String() string

func (*ProbeRequest_Option) XXX_DiscardUnknown

func (m *ProbeRequest_Option) XXX_DiscardUnknown()

func (*ProbeRequest_Option) XXX_Marshal

func (m *ProbeRequest_Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProbeRequest_Option) XXX_Merge

func (m *ProbeRequest_Option) XXX_Merge(src proto.Message)

func (*ProbeRequest_Option) XXX_Size

func (m *ProbeRequest_Option) XXX_Size() int

func (*ProbeRequest_Option) XXX_Unmarshal

func (m *ProbeRequest_Option) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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