faultv3

package
v1.36.11-2026042420273... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FaultAbort_ErrorType_not_set_case case_FaultAbort_ErrorType = 0
View Source
const FaultAbort_GrpcStatus_case case_FaultAbort_ErrorType = 5
View Source
const FaultAbort_HeaderAbort_case case_FaultAbort_ErrorType = 4
View Source
const FaultAbort_HttpStatus_case case_FaultAbort_ErrorType = 2

Variables

View Source
var File_envoy_extensions_filters_http_fault_v3_fault_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FaultAbort

type FaultAbort struct {

	// Types that are valid to be assigned to ErrorType:
	//
	//	*FaultAbort_HttpStatus
	//	*FaultAbort_GrpcStatus
	//	*FaultAbort_HeaderAbort_
	ErrorType isFaultAbort_ErrorType `protobuf_oneof:"error_type"`
	// The percentage of requests/operations/connections that will be aborted with the error code
	// provided.
	Percentage *v3.FractionalPercent `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 6]

func (*FaultAbort) ClearErrorType

func (x *FaultAbort) ClearErrorType()

func (*FaultAbort) ClearGrpcStatus

func (x *FaultAbort) ClearGrpcStatus()

func (*FaultAbort) ClearHeaderAbort

func (x *FaultAbort) ClearHeaderAbort()

func (*FaultAbort) ClearHttpStatus

func (x *FaultAbort) ClearHttpStatus()

func (*FaultAbort) ClearPercentage

func (x *FaultAbort) ClearPercentage()

func (*FaultAbort) GetErrorType

func (x *FaultAbort) GetErrorType() isFaultAbort_ErrorType

func (*FaultAbort) GetGrpcStatus

func (x *FaultAbort) GetGrpcStatus() uint32

func (*FaultAbort) GetHeaderAbort

func (x *FaultAbort) GetHeaderAbort() *FaultAbort_HeaderAbort

func (*FaultAbort) GetHttpStatus

func (x *FaultAbort) GetHttpStatus() uint32

func (*FaultAbort) GetPercentage

func (x *FaultAbort) GetPercentage() *v3.FractionalPercent

func (*FaultAbort) HasErrorType

func (x *FaultAbort) HasErrorType() bool

func (*FaultAbort) HasGrpcStatus

func (x *FaultAbort) HasGrpcStatus() bool

func (*FaultAbort) HasHeaderAbort

func (x *FaultAbort) HasHeaderAbort() bool

func (*FaultAbort) HasHttpStatus

func (x *FaultAbort) HasHttpStatus() bool

func (*FaultAbort) HasPercentage

func (x *FaultAbort) HasPercentage() bool

func (*FaultAbort) ProtoMessage

func (*FaultAbort) ProtoMessage()

func (*FaultAbort) ProtoReflect

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

func (*FaultAbort) Reset

func (x *FaultAbort) Reset()

func (*FaultAbort) SetGrpcStatus

func (x *FaultAbort) SetGrpcStatus(v uint32)

func (*FaultAbort) SetHeaderAbort

func (x *FaultAbort) SetHeaderAbort(v *FaultAbort_HeaderAbort)

func (*FaultAbort) SetHttpStatus

func (x *FaultAbort) SetHttpStatus(v uint32)

func (*FaultAbort) SetPercentage

func (x *FaultAbort) SetPercentage(v *v3.FractionalPercent)

func (*FaultAbort) String

func (x *FaultAbort) String() string

func (*FaultAbort) WhichErrorType

func (x *FaultAbort) WhichErrorType() case_FaultAbort_ErrorType

type FaultAbort_GrpcStatus

type FaultAbort_GrpcStatus struct {
	// gRPC status code to use to abort the gRPC request.
	GrpcStatus uint32 `protobuf:"varint,5,opt,name=grpc_status,json=grpcStatus,proto3,oneof"`
}

type FaultAbort_HeaderAbort

type FaultAbort_HeaderAbort struct {
	// contains filtered or unexported fields
}

Fault aborts are controlled via an HTTP header (if applicable). See the :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` documentation for more information.

func (*FaultAbort_HeaderAbort) ProtoMessage

func (*FaultAbort_HeaderAbort) ProtoMessage()

func (*FaultAbort_HeaderAbort) ProtoReflect

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

func (*FaultAbort_HeaderAbort) Reset

func (x *FaultAbort_HeaderAbort) Reset()

func (*FaultAbort_HeaderAbort) String

func (x *FaultAbort_HeaderAbort) String() string

type FaultAbort_HeaderAbort_

type FaultAbort_HeaderAbort_ struct {
	// Fault aborts are controlled via an HTTP header (if applicable).
	HeaderAbort *FaultAbort_HeaderAbort `protobuf:"bytes,4,opt,name=header_abort,json=headerAbort,proto3,oneof"`
}

type FaultAbort_HeaderAbort_builder

type FaultAbort_HeaderAbort_builder struct {
	// contains filtered or unexported fields
}

func (FaultAbort_HeaderAbort_builder) Build

type FaultAbort_HttpStatus

type FaultAbort_HttpStatus struct {
	// HTTP status code to use to abort the HTTP request.
	HttpStatus uint32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"`
}

type FaultAbort_builder

type FaultAbort_builder struct {

	// Fields of oneof ErrorType:
	// HTTP status code to use to abort the HTTP request.
	HttpStatus *uint32
	// gRPC status code to use to abort the gRPC request.
	GrpcStatus *uint32
	// Fault aborts are controlled via an HTTP header (if applicable).
	HeaderAbort *FaultAbort_HeaderAbort
	// -- end of ErrorType
	// The percentage of requests/operations/connections that will be aborted with the error code
	// provided.
	Percentage *v3.FractionalPercent
	// contains filtered or unexported fields
}

func (FaultAbort_builder) Build

func (b0 FaultAbort_builder) Build() *FaultAbort

type HTTPFault

type HTTPFault struct {

	// If specified, the filter will inject delays based on the values in the
	// object.
	Delay *v31.FaultDelay `protobuf:"bytes,1,opt,name=delay,proto3" json:"delay,omitempty"`
	// If specified, the filter will abort requests based on the values in
	// the object. At least “abort“ or “delay“ must be specified.
	Abort *FaultAbort `protobuf:"bytes,2,opt,name=abort,proto3" json:"abort,omitempty"`
	// Specifies the name of the (destination) upstream cluster that the
	// filter should match on. Fault injection will be restricted to requests
	// bound to the specific upstream cluster.
	UpstreamCluster string `protobuf:"bytes,3,opt,name=upstream_cluster,json=upstreamCluster,proto3" json:"upstream_cluster,omitempty"`
	// Specifies a set of headers that the filter should match on. The fault
	// injection filter can be applied selectively to requests that match a set of
	// headers specified in the fault filter config. The chances of actual fault
	// injection further depend on the value of the :ref:`percentage
	// <envoy_v3_api_field_extensions.filters.http.fault.v3.FaultAbort.percentage>` field.
	// The filter will check the request's headers against all the specified
	// headers in the filter config. A match will happen if all the headers in the
	// config are present in the request with the same values (or based on
	// presence if the “value“ field is not in the config).
	Headers []*v32.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"`
	// Faults are injected for the specified list of downstream hosts. If this
	// setting is not set, faults are injected for all downstream nodes.
	// Downstream node name is taken from :ref:`the HTTP
	// x-envoy-downstream-service-node
	// <config_http_conn_man_headers_downstream-service-node>` header and compared
	// against downstream_nodes list.
	DownstreamNodes []string `protobuf:"bytes,5,rep,name=downstream_nodes,json=downstreamNodes,proto3" json:"downstream_nodes,omitempty"`
	// The maximum number of faults that can be active at a single time via the configured fault
	// filter. Note that because this setting can be overridden at the route level, it's possible
	// for the number of active faults to be greater than this value (if injected via a different
	// route). If not specified, defaults to unlimited. This setting can be overridden via
	// “runtime <config_http_filters_fault_injection_runtime>“ and any faults that are not injected
	// due to overflow will be indicated via the “faults_overflow
	// <config_http_filters_fault_injection_stats>“ stat.
	//
	// .. attention::
	//
	//	Like other :ref:`circuit breakers <arch_overview_circuit_break>` in Envoy, this is a fuzzy
	//	limit. It's possible for the number of active faults to rise slightly above the configured
	//	amount due to the implementation details.
	MaxActiveFaults *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=max_active_faults,json=maxActiveFaults,proto3" json:"max_active_faults,omitempty"`
	// The response rate limit to be applied to the response body of the stream. When configured,
	// the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent
	// <config_http_filters_fault_injection_runtime>` runtime key.
	//
	// .. attention::
	//
	//	This is a per-stream limit versus a connection level limit. This means that concurrent streams
	//	will each get an independent limit.
	ResponseRateLimit *v31.FaultRateLimit `protobuf:"bytes,7,opt,name=response_rate_limit,json=responseRateLimit,proto3" json:"response_rate_limit,omitempty"`
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.delay.fixed_delay_percent
	DelayPercentRuntime string `protobuf:"bytes,8,opt,name=delay_percent_runtime,json=delayPercentRuntime,proto3" json:"delay_percent_runtime,omitempty"`
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.abort_percent
	AbortPercentRuntime string `protobuf:"bytes,9,opt,name=abort_percent_runtime,json=abortPercentRuntime,proto3" json:"abort_percent_runtime,omitempty"`
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.delay.fixed_duration_ms
	DelayDurationRuntime string `protobuf:"bytes,10,opt,name=delay_duration_runtime,json=delayDurationRuntime,proto3" json:"delay_duration_runtime,omitempty"`
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.http_status
	AbortHttpStatusRuntime string `` /* 132-byte string literal not displayed */
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.max_active_faults
	MaxActiveFaultsRuntime string `` /* 132-byte string literal not displayed */
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.rate_limit.response_percent
	ResponseRateLimitPercentRuntime string `` /* 161-byte string literal not displayed */
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.grpc_status
	AbortGrpcStatusRuntime string `` /* 132-byte string literal not displayed */
	// To control whether stats storage is allocated dynamically for each downstream server.
	// If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter.
	// If set to false, dynamic stats storage will be allocated for the downstream cluster name.
	// Default value is false.
	DisableDownstreamClusterStats bool `` /* 154-byte string literal not displayed */
	// When an abort or delay fault is executed, the metadata struct provided here will be added to the
	// request's dynamic metadata under the namespace corresponding to the name of the fault filter.
	// This data can be logged as part of Access Logs using the :ref:`command operator
	// <config_access_log_command_operators>` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of
	// the fault filter.
	FilterMetadata *structpb.Struct `protobuf:"bytes,16,opt,name=filter_metadata,json=filterMetadata,proto3" json:"filter_metadata,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 17]

func (*HTTPFault) ClearAbort

func (x *HTTPFault) ClearAbort()

func (*HTTPFault) ClearDelay

func (x *HTTPFault) ClearDelay()

func (*HTTPFault) ClearFilterMetadata

func (x *HTTPFault) ClearFilterMetadata()

func (*HTTPFault) ClearMaxActiveFaults

func (x *HTTPFault) ClearMaxActiveFaults()

func (*HTTPFault) ClearResponseRateLimit

func (x *HTTPFault) ClearResponseRateLimit()

func (*HTTPFault) GetAbort

func (x *HTTPFault) GetAbort() *FaultAbort

func (*HTTPFault) GetAbortGrpcStatusRuntime

func (x *HTTPFault) GetAbortGrpcStatusRuntime() string

func (*HTTPFault) GetAbortHttpStatusRuntime

func (x *HTTPFault) GetAbortHttpStatusRuntime() string

func (*HTTPFault) GetAbortPercentRuntime

func (x *HTTPFault) GetAbortPercentRuntime() string

func (*HTTPFault) GetDelay

func (x *HTTPFault) GetDelay() *v31.FaultDelay

func (*HTTPFault) GetDelayDurationRuntime

func (x *HTTPFault) GetDelayDurationRuntime() string

func (*HTTPFault) GetDelayPercentRuntime

func (x *HTTPFault) GetDelayPercentRuntime() string

func (*HTTPFault) GetDisableDownstreamClusterStats

func (x *HTTPFault) GetDisableDownstreamClusterStats() bool

func (*HTTPFault) GetDownstreamNodes

func (x *HTTPFault) GetDownstreamNodes() []string

func (*HTTPFault) GetFilterMetadata

func (x *HTTPFault) GetFilterMetadata() *structpb.Struct

func (*HTTPFault) GetHeaders

func (x *HTTPFault) GetHeaders() []*v32.HeaderMatcher

func (*HTTPFault) GetMaxActiveFaults

func (x *HTTPFault) GetMaxActiveFaults() *wrapperspb.UInt32Value

func (*HTTPFault) GetMaxActiveFaultsRuntime

func (x *HTTPFault) GetMaxActiveFaultsRuntime() string

func (*HTTPFault) GetResponseRateLimit

func (x *HTTPFault) GetResponseRateLimit() *v31.FaultRateLimit

func (*HTTPFault) GetResponseRateLimitPercentRuntime

func (x *HTTPFault) GetResponseRateLimitPercentRuntime() string

func (*HTTPFault) GetUpstreamCluster

func (x *HTTPFault) GetUpstreamCluster() string

func (*HTTPFault) HasAbort

func (x *HTTPFault) HasAbort() bool

func (*HTTPFault) HasDelay

func (x *HTTPFault) HasDelay() bool

func (*HTTPFault) HasFilterMetadata

func (x *HTTPFault) HasFilterMetadata() bool

func (*HTTPFault) HasMaxActiveFaults

func (x *HTTPFault) HasMaxActiveFaults() bool

func (*HTTPFault) HasResponseRateLimit

func (x *HTTPFault) HasResponseRateLimit() bool

func (*HTTPFault) ProtoMessage

func (*HTTPFault) ProtoMessage()

func (*HTTPFault) ProtoReflect

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

func (*HTTPFault) Reset

func (x *HTTPFault) Reset()

func (*HTTPFault) SetAbort

func (x *HTTPFault) SetAbort(v *FaultAbort)

func (*HTTPFault) SetAbortGrpcStatusRuntime

func (x *HTTPFault) SetAbortGrpcStatusRuntime(v string)

func (*HTTPFault) SetAbortHttpStatusRuntime

func (x *HTTPFault) SetAbortHttpStatusRuntime(v string)

func (*HTTPFault) SetAbortPercentRuntime

func (x *HTTPFault) SetAbortPercentRuntime(v string)

func (*HTTPFault) SetDelay

func (x *HTTPFault) SetDelay(v *v31.FaultDelay)

func (*HTTPFault) SetDelayDurationRuntime

func (x *HTTPFault) SetDelayDurationRuntime(v string)

func (*HTTPFault) SetDelayPercentRuntime

func (x *HTTPFault) SetDelayPercentRuntime(v string)

func (*HTTPFault) SetDisableDownstreamClusterStats

func (x *HTTPFault) SetDisableDownstreamClusterStats(v bool)

func (*HTTPFault) SetDownstreamNodes

func (x *HTTPFault) SetDownstreamNodes(v []string)

func (*HTTPFault) SetFilterMetadata

func (x *HTTPFault) SetFilterMetadata(v *structpb.Struct)

func (*HTTPFault) SetHeaders

func (x *HTTPFault) SetHeaders(v []*v32.HeaderMatcher)

func (*HTTPFault) SetMaxActiveFaults

func (x *HTTPFault) SetMaxActiveFaults(v *wrapperspb.UInt32Value)

func (*HTTPFault) SetMaxActiveFaultsRuntime

func (x *HTTPFault) SetMaxActiveFaultsRuntime(v string)

func (*HTTPFault) SetResponseRateLimit

func (x *HTTPFault) SetResponseRateLimit(v *v31.FaultRateLimit)

func (*HTTPFault) SetResponseRateLimitPercentRuntime

func (x *HTTPFault) SetResponseRateLimitPercentRuntime(v string)

func (*HTTPFault) SetUpstreamCluster

func (x *HTTPFault) SetUpstreamCluster(v string)

func (*HTTPFault) String

func (x *HTTPFault) String() string

type HTTPFault_builder

type HTTPFault_builder struct {

	// If specified, the filter will inject delays based on the values in the
	// object.
	Delay *v31.FaultDelay
	// If specified, the filter will abort requests based on the values in
	// the object. At least “abort“ or “delay“ must be specified.
	Abort *FaultAbort
	// Specifies the name of the (destination) upstream cluster that the
	// filter should match on. Fault injection will be restricted to requests
	// bound to the specific upstream cluster.
	UpstreamCluster string
	// Specifies a set of headers that the filter should match on. The fault
	// injection filter can be applied selectively to requests that match a set of
	// headers specified in the fault filter config. The chances of actual fault
	// injection further depend on the value of the :ref:`percentage
	// <envoy_v3_api_field_extensions.filters.http.fault.v3.FaultAbort.percentage>` field.
	// The filter will check the request's headers against all the specified
	// headers in the filter config. A match will happen if all the headers in the
	// config are present in the request with the same values (or based on
	// presence if the “value“ field is not in the config).
	Headers []*v32.HeaderMatcher
	// Faults are injected for the specified list of downstream hosts. If this
	// setting is not set, faults are injected for all downstream nodes.
	// Downstream node name is taken from :ref:`the HTTP
	// x-envoy-downstream-service-node
	// <config_http_conn_man_headers_downstream-service-node>` header and compared
	// against downstream_nodes list.
	DownstreamNodes []string
	// The maximum number of faults that can be active at a single time via the configured fault
	// filter. Note that because this setting can be overridden at the route level, it's possible
	// for the number of active faults to be greater than this value (if injected via a different
	// route). If not specified, defaults to unlimited. This setting can be overridden via
	// “runtime <config_http_filters_fault_injection_runtime>“ and any faults that are not injected
	// due to overflow will be indicated via the “faults_overflow
	// <config_http_filters_fault_injection_stats>“ stat.
	//
	// .. attention::
	//
	//	Like other :ref:`circuit breakers <arch_overview_circuit_break>` in Envoy, this is a fuzzy
	//	limit. It's possible for the number of active faults to rise slightly above the configured
	//	amount due to the implementation details.
	MaxActiveFaults *wrapperspb.UInt32Value
	// The response rate limit to be applied to the response body of the stream. When configured,
	// the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent
	// <config_http_filters_fault_injection_runtime>` runtime key.
	//
	// .. attention::
	//
	//	This is a per-stream limit versus a connection level limit. This means that concurrent streams
	//	will each get an independent limit.
	ResponseRateLimit *v31.FaultRateLimit
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.delay.fixed_delay_percent
	DelayPercentRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.abort_percent
	AbortPercentRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.delay.fixed_duration_ms
	DelayDurationRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.http_status
	AbortHttpStatusRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.max_active_faults
	MaxActiveFaultsRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.rate_limit.response_percent
	ResponseRateLimitPercentRuntime string
	// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
	// runtime. The default is: fault.http.abort.grpc_status
	AbortGrpcStatusRuntime string
	// To control whether stats storage is allocated dynamically for each downstream server.
	// If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter.
	// If set to false, dynamic stats storage will be allocated for the downstream cluster name.
	// Default value is false.
	DisableDownstreamClusterStats bool
	// When an abort or delay fault is executed, the metadata struct provided here will be added to the
	// request's dynamic metadata under the namespace corresponding to the name of the fault filter.
	// This data can be logged as part of Access Logs using the :ref:`command operator
	// <config_access_log_command_operators>` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of
	// the fault filter.
	FilterMetadata *structpb.Struct
	// contains filtered or unexported fields
}

func (HTTPFault_builder) Build

func (b0 HTTPFault_builder) Build() *HTTPFault

Source Files

  • fault.pb.go

Jump to

Keyboard shortcuts

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