proto

package
Version: 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: 6 Imported by: 9

Documentation

Index

Constants

View Source
const (
	Default_ProbeConf_Protocol                   = ProbeConf_HTTP
	Default_ProbeConf_ResolveFirst               = bool(false)
	Default_ProbeConf_ExportResponseAsMetrics    = bool(false)
	Default_ProbeConf_Method                     = ProbeConf_GET
	Default_ProbeConf_IntervalBetweenTargetsMsec = int32(10)
	Default_ProbeConf_RequestsPerProbe           = int32(1)
	Default_ProbeConf_RequestsIntervalMsec       = int32(25)
)

Default values for ProbeConf fields.

Variables

View Source
var (
	ProbeConf_ProtocolType_name = map[int32]string{
		0: "HTTP",
		1: "HTTPS",
	}
	ProbeConf_ProtocolType_value = map[string]int32{
		"HTTP":  0,
		"HTTPS": 1,
	}
)

Enum value maps for ProbeConf_ProtocolType.

View Source
var (
	ProbeConf_Method_name = map[int32]string{
		0: "GET",
		1: "POST",
		2: "PUT",
		3: "HEAD",
		4: "DELETE",
		5: "PATCH",
		6: "OPTIONS",
	}
	ProbeConf_Method_value = map[string]int32{
		"GET":     0,
		"POST":    1,
		"PUT":     2,
		"HEAD":    3,
		"DELETE":  4,
		"PATCH":   5,
		"OPTIONS": 6,
	}
)

Enum value maps for ProbeConf_Method.

View Source
var File_github_com_google_cloudprober_probes_http_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ProbeConf

type ProbeConf struct {

	// Which HTTP protocol to use
	Protocol *ProbeConf_ProtocolType `protobuf:"varint,1,opt,name=protocol,enum=cloudprober.probes.http.ProbeConf_ProtocolType,def=0" json:"protocol,omitempty"`
	// Relative URL (to append to all targets). Must begin with '/'
	RelativeUrl *string `protobuf:"bytes,2,opt,name=relative_url,json=relativeUrl" json:"relative_url,omitempty"`
	// Port for HTTP requests. If not specfied, port is selected in the following
	// order:
	//  - If port is provided by the targets (e.g. kubernetes endpoint or
	//    service), that port is used.
	//  - 80 for HTTP and 443 for HTTPS.
	Port *int32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
	// Whether to resolve the target before making the request. If set to false,
	// we hand over the target and relative_url directly to the golang's HTTP
	// module, Otherwise, we resolve the target first to an IP address and
	// make a request using that while passing target name as Host header.
	ResolveFirst *bool `protobuf:"varint,4,opt,name=resolve_first,json=resolveFirst,def=0" json:"resolve_first,omitempty"`
	// Export response (body) count as a metric
	ExportResponseAsMetrics *bool `` /* 134-byte string literal not displayed */
	// HTTP request method
	Method *ProbeConf_Method `protobuf:"varint,7,opt,name=method,enum=cloudprober.probes.http.ProbeConf_Method,def=0" json:"method,omitempty"`
	// HTTP request headers
	Headers []*ProbeConf_Header `protobuf:"bytes,8,rep,name=headers" json:"headers,omitempty"`
	// Request body.
	Body *string `protobuf:"bytes,9,opt,name=body" json:"body,omitempty"`
	// Enable HTTP keep-alive. If set to true, underlying connection is reused
	// for further probes. Default is to close the connection after every request.
	KeepAlive *bool `protobuf:"varint,10,opt,name=keep_alive,json=keepAlive" json:"keep_alive,omitempty"`
	// OAuth Config
	OauthConfig *proto.Config `protobuf:"bytes,11,opt,name=oauth_config,json=oauthConfig" json:"oauth_config,omitempty"`
	// Disable HTTP2
	// Golang HTTP client automatically enables HTTP/2 if server supports it. This
	// option disables that behavior to enforce HTTP/1.1 for testing purpose.
	DisableHttp2 *bool `protobuf:"varint,13,opt,name=disable_http2,json=disableHttp2" json:"disable_http2,omitempty"`
	// Disable TLS certificate validation. If set to true, any certificate
	// presented by the server for any host name will be accepted
	// Deprecation: This option is now subsumed by the tls_config below. To
	// disable cert validation use:
	// tls_config {
	//   disable_cert_validation: true
	// }
	DisableCertValidation *bool `protobuf:"varint,14,opt,name=disable_cert_validation,json=disableCertValidation" json:"disable_cert_validation,omitempty"`
	// TLS config
	TlsConfig *proto1.TLSConfig `protobuf:"bytes,15,opt,name=tls_config,json=tlsConfig" json:"tls_config,omitempty"`
	// Proxy URL, e.g. http://myproxy:3128
	ProxyUrl *string `protobuf:"bytes,16,opt,name=proxy_url,json=proxyUrl" json:"proxy_url,omitempty"`
	// Interval between targets.
	IntervalBetweenTargetsMsec *int32 `` /* 145-byte string literal not displayed */
	// Requests per probe.
	// Number of HTTP requests per probe. Requests are executed concurrently and
	// each HTTP re contributes to probe results. For example, if you run two
	// requests per probe, "total" counter will be incremented by 2.
	RequestsPerProbe *int32 `protobuf:"varint,98,opt,name=requests_per_probe,json=requestsPerProbe,def=1" json:"requests_per_probe,omitempty"`
	// How long to wait between two requests to the same target
	// NOTE: This field is now deprecated and will be removed after the v0.10.3
	// releases.
	RequestsIntervalMsec *int32 `protobuf:"varint,99,opt,name=requests_interval_msec,json=requestsIntervalMsec,def=25" json:"requests_interval_msec,omitempty"`
	// contains filtered or unexported fields
}

Next tag: 17

func (*ProbeConf) Descriptor deprecated

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

Deprecated: Use ProbeConf.ProtoReflect.Descriptor instead.

func (*ProbeConf) GetBody

func (x *ProbeConf) GetBody() string

func (*ProbeConf) GetDisableCertValidation added in v0.10.2

func (x *ProbeConf) GetDisableCertValidation() bool

func (*ProbeConf) GetDisableHttp2 added in v0.10.2

func (x *ProbeConf) GetDisableHttp2() bool

func (*ProbeConf) GetExportResponseAsMetrics

func (x *ProbeConf) GetExportResponseAsMetrics() bool

func (*ProbeConf) GetHeaders

func (x *ProbeConf) GetHeaders() []*ProbeConf_Header

func (*ProbeConf) GetIntervalBetweenTargetsMsec added in v0.11.2

func (x *ProbeConf) GetIntervalBetweenTargetsMsec() int32

func (*ProbeConf) GetKeepAlive added in v0.10.2

func (x *ProbeConf) GetKeepAlive() bool

func (*ProbeConf) GetMethod

func (x *ProbeConf) GetMethod() ProbeConf_Method

func (*ProbeConf) GetOauthConfig added in v0.10.7

func (x *ProbeConf) GetOauthConfig() *proto.Config

func (*ProbeConf) GetPort

func (x *ProbeConf) GetPort() int32

func (*ProbeConf) GetProtocol

func (x *ProbeConf) GetProtocol() ProbeConf_ProtocolType

func (*ProbeConf) GetProxyUrl added in v0.10.8

func (x *ProbeConf) GetProxyUrl() string

func (*ProbeConf) GetRelativeUrl

func (x *ProbeConf) GetRelativeUrl() string

func (*ProbeConf) GetRequestsIntervalMsec

func (x *ProbeConf) GetRequestsIntervalMsec() int32

func (*ProbeConf) GetRequestsPerProbe

func (x *ProbeConf) GetRequestsPerProbe() int32

func (*ProbeConf) GetResolveFirst

func (x *ProbeConf) GetResolveFirst() bool

func (*ProbeConf) GetTlsConfig added in v0.10.6

func (x *ProbeConf) GetTlsConfig() *proto1.TLSConfig

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_Header

type ProbeConf_Header 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
}

func (*ProbeConf_Header) Descriptor deprecated

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

Deprecated: Use ProbeConf_Header.ProtoReflect.Descriptor instead.

func (*ProbeConf_Header) GetName

func (x *ProbeConf_Header) GetName() string

func (*ProbeConf_Header) GetValue

func (x *ProbeConf_Header) GetValue() string

func (*ProbeConf_Header) ProtoMessage

func (*ProbeConf_Header) ProtoMessage()

func (*ProbeConf_Header) ProtoReflect added in v0.10.8

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

func (*ProbeConf_Header) Reset

func (x *ProbeConf_Header) Reset()

func (*ProbeConf_Header) String

func (x *ProbeConf_Header) String() string

type ProbeConf_Method

type ProbeConf_Method int32
const (
	ProbeConf_GET     ProbeConf_Method = 0
	ProbeConf_POST    ProbeConf_Method = 1
	ProbeConf_PUT     ProbeConf_Method = 2
	ProbeConf_HEAD    ProbeConf_Method = 3
	ProbeConf_DELETE  ProbeConf_Method = 4
	ProbeConf_PATCH   ProbeConf_Method = 5
	ProbeConf_OPTIONS ProbeConf_Method = 6
)

func (ProbeConf_Method) Descriptor added in v0.10.8

func (ProbeConf_Method) Enum

func (ProbeConf_Method) EnumDescriptor deprecated

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

Deprecated: Use ProbeConf_Method.Descriptor instead.

func (ProbeConf_Method) Number added in v0.10.8

func (ProbeConf_Method) String

func (x ProbeConf_Method) String() string

func (ProbeConf_Method) Type added in v0.10.8

func (*ProbeConf_Method) UnmarshalJSON deprecated

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

Deprecated: Do not use.

type ProbeConf_ProtocolType

type ProbeConf_ProtocolType int32
const (
	ProbeConf_HTTP  ProbeConf_ProtocolType = 0
	ProbeConf_HTTPS ProbeConf_ProtocolType = 1
)

func (ProbeConf_ProtocolType) Descriptor added in v0.10.8

func (ProbeConf_ProtocolType) Enum

func (ProbeConf_ProtocolType) EnumDescriptor deprecated

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

Deprecated: Use ProbeConf_ProtocolType.Descriptor instead.

func (ProbeConf_ProtocolType) Number added in v0.10.8

func (ProbeConf_ProtocolType) String

func (x ProbeConf_ProtocolType) String() string

func (ProbeConf_ProtocolType) Type added in v0.10.8

func (*ProbeConf_ProtocolType) UnmarshalJSON deprecated

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

Deprecated: Do not use.

Source Files

Jump to

Keyboard shortcuts

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