proto

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Validator

type Validator struct {

	// Comma-separated list of success status codes and code ranges.
	// Example: success_stauts_codes: 200-299,301,302
	SuccessStatusCodes *string `protobuf:"bytes,1,opt,name=success_status_codes,json=successStatusCodes,proto3,oneof" json:"success_status_codes,omitempty"`
	// Comma-separated list of failure status codes and code ranges. If HTTP
	// status code matches failure_status_codes, validator fails.
	FailureStatusCodes *string `protobuf:"bytes,2,opt,name=failure_status_codes,json=failureStatusCodes,proto3,oneof" json:"failure_status_codes,omitempty"`
	// Header based validations.
	// TODO(manugarg): Add support for specifying multiple success and failure
	// headers.
	//
	// Success Header:
	//
	//	If specified, HTTP response headers should match the success_header for
	//	validation to succeed. Example:
	//	  success_header: {
	//	    name: "Strict-Transport-Security"
	//	    value_regex: "max-age=31536000"
	//	  }
	SuccessHeader *Validator_Header `protobuf:"bytes,3,opt,name=success_header,json=successHeader,proto3,oneof" json:"success_header,omitempty"`
	// Failure Header:
	//
	//	If HTTP response headers match failure_header, validation fails.
	FailureHeader *Validator_Header `protobuf:"bytes,4,opt,name=failure_header,json=failureHeader,proto3,oneof" json:"failure_header,omitempty"`
	// Last Modified Difference:
	//
	//	If specified, HTTP response's Last-Modified header is checked to be
	//	within the specified time difference from the current time. Example:
	//	  max_last_modified_diff_sec: 3600
	//	This will check that the Last-Modified header is within the last hour.
	MaxLastModifiedDiffSec uint64 `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

HTTP validator configuration. For HTTP validator to succeed, all conditions specified in the validator should succeed. Note that failures conditions are evaluated before success conditions.

func (*Validator) Descriptor deprecated

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

Deprecated: Use Validator.ProtoReflect.Descriptor instead.

func (*Validator) GetFailureHeader

func (x *Validator) GetFailureHeader() *Validator_Header

func (*Validator) GetFailureStatusCodes

func (x *Validator) GetFailureStatusCodes() string

func (*Validator) GetMaxLastModifiedDiffSec

func (x *Validator) GetMaxLastModifiedDiffSec() uint64

func (*Validator) GetSuccessHeader

func (x *Validator) GetSuccessHeader() *Validator_Header

func (*Validator) GetSuccessStatusCodes

func (x *Validator) GetSuccessStatusCodes() string

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) ProtoReflect

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

func (*Validator) Reset

func (x *Validator) Reset()

func (*Validator) String

func (x *Validator) String() string

type Validator_Header

type Validator_Header struct {

	// Header name to look for
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// Header value to match. If omited - check for header existence
	ValueRegex *string `protobuf:"bytes,2,opt,name=value_regex,json=valueRegex,proto3,oneof" json:"value_regex,omitempty"`
	// contains filtered or unexported fields
}

func (*Validator_Header) Descriptor deprecated

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

Deprecated: Use Validator_Header.ProtoReflect.Descriptor instead.

func (*Validator_Header) GetName

func (x *Validator_Header) GetName() string

func (*Validator_Header) GetValueRegex

func (x *Validator_Header) GetValueRegex() string

func (*Validator_Header) ProtoMessage

func (*Validator_Header) ProtoMessage()

func (*Validator_Header) ProtoReflect

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

func (*Validator_Header) Reset

func (x *Validator_Header) Reset()

func (*Validator_Header) String

func (x *Validator_Header) String() string

Jump to

Keyboard shortcuts

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