advanced_http

package
v1.11.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HealthCheckResult_name = map[int32]string{
		0: "healthy",
		1: "degraded",
		2: "unhealthy",
	}
	HealthCheckResult_value = map[string]int32{
		"healthy":   0,
		"degraded":  1,
		"unhealthy": 2,
	}
)

Enum value maps for HealthCheckResult.

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_external_envoy_extensions_advanced_http_advanced_http_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AdvancedHttp

type AdvancedHttp struct {

	// Http health check.
	HttpHealthCheck *v3.HealthCheck_HttpHealthCheck `protobuf:"bytes,1,opt,name=http_health_check,json=httpHealthCheck,proto3" json:"http_health_check,omitempty"`
	// If defined, the response health check rules take precedence over the http status
	// settings defined in `http_health_check`
	ResponseAssertions *ResponseAssertions `protobuf:"bytes,2,opt,name=response_assertions,json=responseAssertions,proto3" json:"response_assertions,omitempty"`
	// contains filtered or unexported fields
}

Same as envoy's default HTTP health checker, but with some additions:

  • allows a custom path and method on the health check request per endpoint. The http path to use can be overridden using endpoint metadata. The endpoint-specific path should be in the "io.solo.health_checkers.advanced_http" namespace, under a string value named "path". The same can be done for the method by setting a string value named "method".
  • allows for health check responses to leverage the response body rather than just the http status code returned. The response body can be parsed as json and complex assertions can be made on fields parsed from the json or plaintext response body.

func (*AdvancedHttp) Descriptor deprecated

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

Deprecated: Use AdvancedHttp.ProtoReflect.Descriptor instead.

func (*AdvancedHttp) GetHttpHealthCheck

func (x *AdvancedHttp) GetHttpHealthCheck() *v3.HealthCheck_HttpHealthCheck

func (*AdvancedHttp) GetResponseAssertions

func (x *AdvancedHttp) GetResponseAssertions() *ResponseAssertions

func (*AdvancedHttp) ProtoMessage

func (*AdvancedHttp) ProtoMessage()

func (*AdvancedHttp) ProtoReflect

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

func (*AdvancedHttp) Reset

func (x *AdvancedHttp) Reset()

func (*AdvancedHttp) String

func (x *AdvancedHttp) String() string

type HealthCheckResult

type HealthCheckResult int32
const (
	HealthCheckResult_healthy   HealthCheckResult = 0
	HealthCheckResult_degraded  HealthCheckResult = 1
	HealthCheckResult_unhealthy HealthCheckResult = 2
)

func (HealthCheckResult) Descriptor

func (HealthCheckResult) Enum

func (HealthCheckResult) EnumDescriptor deprecated

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

Deprecated: Use HealthCheckResult.Descriptor instead.

func (HealthCheckResult) Number

func (HealthCheckResult) String

func (x HealthCheckResult) String() string

func (HealthCheckResult) Type

type JsonKey

type JsonKey struct {

	// The path to retrieve the Value.
	Path []*JsonKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*JsonKey) Descriptor deprecated

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

Deprecated: Use JsonKey.ProtoReflect.Descriptor instead.

func (*JsonKey) GetPath

func (x *JsonKey) GetPath() []*JsonKey_PathSegment

func (*JsonKey) ProtoMessage

func (*JsonKey) ProtoMessage()

func (*JsonKey) ProtoReflect

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

func (*JsonKey) Reset

func (x *JsonKey) Reset()

func (*JsonKey) String

func (x *JsonKey) String() string

type JsonKey_PathSegment

type JsonKey_PathSegment struct {

	// Types that are assignable to Segment:
	//	*JsonKey_PathSegment_Key
	Segment isJsonKey_PathSegment_Segment `protobuf_oneof:"segment"`
	// contains filtered or unexported fields
}

Specifies the segment in a path to retrieve value.

func (*JsonKey_PathSegment) Descriptor deprecated

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

Deprecated: Use JsonKey_PathSegment.ProtoReflect.Descriptor instead.

func (*JsonKey_PathSegment) GetKey

func (x *JsonKey_PathSegment) GetKey() string

func (*JsonKey_PathSegment) GetSegment

func (m *JsonKey_PathSegment) GetSegment() isJsonKey_PathSegment_Segment

func (*JsonKey_PathSegment) ProtoMessage

func (*JsonKey_PathSegment) ProtoMessage()

func (*JsonKey_PathSegment) ProtoReflect

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

func (*JsonKey_PathSegment) Reset

func (x *JsonKey_PathSegment) Reset()

func (*JsonKey_PathSegment) String

func (x *JsonKey_PathSegment) String() string

type JsonKey_PathSegment_Key

type JsonKey_PathSegment_Key struct {
	// If specified, use the key to retrieve the value.
	// If the key is not found, the value defaults to empty string.
	Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
}

type ResponseAssertions

type ResponseAssertions struct {

	// A bunch of match rules, the first match wins out and short-circuits
	ResponseMatchers []*ResponseMatcher `protobuf:"bytes,1,rep,name=response_matchers,json=responseMatchers,proto3" json:"response_matchers,omitempty"`
	// The default health response if none of the response health checks were matches.
	// If omitted, defaults to healthy.
	// Note for devs: we'd probably prefer this default to unhealthy, but since the
	// version of protoc we're on doesn't support optional scalars without an
	// experimental flag, we cannot have the `no_match_health` field default to
	// unhealthy while the `match_health` field defaults to healthy.
	//
	// As such, we offload this defaulting behavior to the control plane.
	// For more reading, see https://github.com/protocolbuffers/protobuf/issues/1606#issuecomment-618687169
	NoMatchHealth HealthCheckResult `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ResponseAssertions) Descriptor deprecated

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

Deprecated: Use ResponseAssertions.ProtoReflect.Descriptor instead.

func (*ResponseAssertions) GetNoMatchHealth

func (x *ResponseAssertions) GetNoMatchHealth() HealthCheckResult

func (*ResponseAssertions) GetResponseMatchers

func (x *ResponseAssertions) GetResponseMatchers() []*ResponseMatcher

func (*ResponseAssertions) ProtoMessage

func (*ResponseAssertions) ProtoMessage()

func (*ResponseAssertions) ProtoReflect

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

func (*ResponseAssertions) Reset

func (x *ResponseAssertions) Reset()

func (*ResponseAssertions) String

func (x *ResponseAssertions) String() string

type ResponseMatch

type ResponseMatch struct {

	// Configuration to get the json key.
	// Treats the body as raw text if omitted.
	JsonKey *JsonKey `protobuf:"bytes,1,opt,name=json_key,json=jsonKey,proto3" json:"json_key,omitempty"`
	// If set to true, Envoy will not throw an exception in case the json body parsing
	// fails.
	IgnoreErrorOnParse bool `protobuf:"varint,2,opt,name=ignore_error_on_parse,json=ignoreErrorOnParse,proto3" json:"ignore_error_on_parse,omitempty"`
	// The source of the extraction
	//
	// Types that are assignable to Source:
	//	*ResponseMatch_Header
	//	*ResponseMatch_Body
	Source isResponseMatch_Source `protobuf_oneof:"source"`
	// Only strings matching this regular expression will be considered a match.
	// The most simple value for this field is '.*', which matches the
	// whole source. The field is required.
	Regex string `protobuf:"bytes,5,opt,name=regex,proto3" json:"regex,omitempty"`
	// contains filtered or unexported fields
}

ResponseMatches can be used to extract information from the request/response.

func (*ResponseMatch) Descriptor deprecated

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

Deprecated: Use ResponseMatch.ProtoReflect.Descriptor instead.

func (*ResponseMatch) GetBody

func (x *ResponseMatch) GetBody() *empty.Empty

func (*ResponseMatch) GetHeader

func (x *ResponseMatch) GetHeader() string

func (*ResponseMatch) GetIgnoreErrorOnParse

func (x *ResponseMatch) GetIgnoreErrorOnParse() bool

func (*ResponseMatch) GetJsonKey

func (x *ResponseMatch) GetJsonKey() *JsonKey

func (*ResponseMatch) GetRegex

func (x *ResponseMatch) GetRegex() string

func (*ResponseMatch) GetSource

func (m *ResponseMatch) GetSource() isResponseMatch_Source

func (*ResponseMatch) ProtoMessage

func (*ResponseMatch) ProtoMessage()

func (*ResponseMatch) ProtoReflect

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

func (*ResponseMatch) Reset

func (x *ResponseMatch) Reset()

func (*ResponseMatch) String

func (x *ResponseMatch) String() string

type ResponseMatch_Body

type ResponseMatch_Body struct {
	// Extract information from the request/response body
	Body *empty.Empty `protobuf:"bytes,4,opt,name=body,proto3,oneof"`
}

type ResponseMatch_Header

type ResponseMatch_Header struct {
	// Extract information from headers
	Header string `protobuf:"bytes,3,opt,name=header,proto3,oneof"`
}

type ResponseMatcher

type ResponseMatcher struct {

	// Defines the parameters to determine a single match
	ResponseMatch *ResponseMatch `protobuf:"bytes,1,opt,name=response_match,json=responseMatch,proto3" json:"response_match,omitempty"`
	// The health response if this response_match is a match.
	// If omitted, defaults to healthy
	MatchHealth HealthCheckResult `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

Defines a transformation template.

func (*ResponseMatcher) Descriptor deprecated

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

Deprecated: Use ResponseMatcher.ProtoReflect.Descriptor instead.

func (*ResponseMatcher) GetMatchHealth

func (x *ResponseMatcher) GetMatchHealth() HealthCheckResult

func (*ResponseMatcher) GetResponseMatch

func (x *ResponseMatcher) GetResponseMatch() *ResponseMatch

func (*ResponseMatcher) ProtoMessage

func (*ResponseMatcher) ProtoMessage()

func (*ResponseMatcher) ProtoReflect

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

func (*ResponseMatcher) Reset

func (x *ResponseMatcher) Reset()

func (*ResponseMatcher) String

func (x *ResponseMatcher) String() string

Jump to

Keyboard shortcuts

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