bandwidth_limitv3

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 21 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BandwidthLimit_EnableMode_name = map[int32]string{
		0: "DISABLED",
		1: "REQUEST",
		2: "RESPONSE",
		3: "REQUEST_AND_RESPONSE",
	}
	BandwidthLimit_EnableMode_value = map[string]int32{
		"DISABLED":             0,
		"REQUEST":              1,
		"RESPONSE":             2,
		"REQUEST_AND_RESPONSE": 3,
	}
)

Enum value maps for BandwidthLimit_EnableMode.

View Source
var File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BandwidthLimit

type BandwidthLimit struct {

	// The human readable prefix to use when emitting stats.
	StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// The enable mode for the bandwidth limit filter.
	// Default is Disabled.
	EnableMode BandwidthLimit_EnableMode `` /* 172-byte string literal not displayed */
	// The limit supplied in KiB/s.
	//
	// .. note::
	//
	//	It's fine for the limit to be unset for the global configuration since the bandwidth limit
	//	can be applied at a the virtual host or route level. Thus, the limit must be set for the
	//	per route configuration otherwise the config will be rejected.
	//
	// .. note::
	//
	//	When using per route configuration, the limit becomes unique to that route.
	LimitKbps *wrappers.UInt64Value `protobuf:"bytes,3,opt,name=limit_kbps,json=limitKbps,proto3" json:"limit_kbps,omitempty"`
	// Optional Fill interval in milliseconds for the token refills. Defaults to 50ms.
	// It must be at least 20ms to avoid too aggressive refills.
	FillInterval *duration.Duration `protobuf:"bytes,4,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"`
	// Runtime flag that controls whether the filter is enabled or not. If not specified, defaults
	// to enabled.
	RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	// Enable response trailers.
	//
	// .. note::
	//
	//	If set true, the following 4 trailers will be added, prefixed by “response_trailer_prefix“:
	//	* bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer including request body transfer time and the time added by the filter.
	//	* bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer including response body transfer time and the time added by the filter.
	//	* bandwidth-request-filter-delay-ms: delay time in milliseconds in request stream transfer added by the filter.
	//	* bandwidth-response-filter-delay-ms: delay time in milliseconds that added by the filter.
	//	If :ref:`enable_mode <envoy_v3_api_field_extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.enable_mode>` is “DISABLED“ or “REQUEST“, the trailers will not be set.
	//	If both the request and response delay time is 0, the trailers will not be set.
	EnableResponseTrailers bool `` /* 130-byte string literal not displayed */
	// Optional The prefix for the response trailers.
	ResponseTrailerPrefix string `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#next-free-field: 8]

func (*BandwidthLimit) Descriptor deprecated

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

Deprecated: Use BandwidthLimit.ProtoReflect.Descriptor instead.

func (*BandwidthLimit) GetEnableMode

func (x *BandwidthLimit) GetEnableMode() BandwidthLimit_EnableMode

func (*BandwidthLimit) GetEnableResponseTrailers added in v0.10.1

func (x *BandwidthLimit) GetEnableResponseTrailers() bool

func (*BandwidthLimit) GetFillInterval

func (x *BandwidthLimit) GetFillInterval() *duration.Duration

func (*BandwidthLimit) GetLimitKbps

func (x *BandwidthLimit) GetLimitKbps() *wrappers.UInt64Value

func (*BandwidthLimit) GetResponseTrailerPrefix added in v0.10.1

func (x *BandwidthLimit) GetResponseTrailerPrefix() string

func (*BandwidthLimit) GetRuntimeEnabled

func (x *BandwidthLimit) GetRuntimeEnabled() *v3.RuntimeFeatureFlag

func (*BandwidthLimit) GetStatPrefix

func (x *BandwidthLimit) GetStatPrefix() string

func (*BandwidthLimit) ProtoMessage

func (*BandwidthLimit) ProtoMessage()

func (*BandwidthLimit) ProtoReflect

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

func (*BandwidthLimit) Reset

func (x *BandwidthLimit) Reset()

func (*BandwidthLimit) String

func (x *BandwidthLimit) String() string

func (*BandwidthLimit) Validate

func (m *BandwidthLimit) Validate() error

Validate checks the field values on BandwidthLimit with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*BandwidthLimit) ValidateAll

func (m *BandwidthLimit) ValidateAll() error

ValidateAll checks the field values on BandwidthLimit with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BandwidthLimitMultiError, or nil if none found.

type BandwidthLimitMultiError

type BandwidthLimitMultiError []error

BandwidthLimitMultiError is an error wrapping multiple validation errors returned by BandwidthLimit.ValidateAll() if the designated constraints aren't met.

func (BandwidthLimitMultiError) AllErrors

func (m BandwidthLimitMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BandwidthLimitMultiError) Error

func (m BandwidthLimitMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type BandwidthLimitValidationError

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

BandwidthLimitValidationError is the validation error returned by BandwidthLimit.Validate if the designated constraints aren't met.

func (BandwidthLimitValidationError) Cause

Cause function returns cause value.

func (BandwidthLimitValidationError) Error

Error satisfies the builtin error interface

func (BandwidthLimitValidationError) ErrorName

func (e BandwidthLimitValidationError) ErrorName() string

ErrorName returns error name.

func (BandwidthLimitValidationError) Field

Field function returns field value.

func (BandwidthLimitValidationError) Key

Key function returns key value.

func (BandwidthLimitValidationError) Reason

Reason function returns reason value.

type BandwidthLimit_EnableMode

type BandwidthLimit_EnableMode int32

Defines the mode for the bandwidth limit filter. Values represent bitmask.

const (
	// Filter is disabled.
	BandwidthLimit_DISABLED BandwidthLimit_EnableMode = 0
	// Filter enabled only for incoming traffic.
	BandwidthLimit_REQUEST BandwidthLimit_EnableMode = 1
	// Filter enabled only for outgoing traffic.
	BandwidthLimit_RESPONSE BandwidthLimit_EnableMode = 2
	// Filter enabled for both incoming and outgoing traffic.
	BandwidthLimit_REQUEST_AND_RESPONSE BandwidthLimit_EnableMode = 3
)

func (BandwidthLimit_EnableMode) Descriptor

func (BandwidthLimit_EnableMode) Enum

func (BandwidthLimit_EnableMode) EnumDescriptor deprecated

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

Deprecated: Use BandwidthLimit_EnableMode.Descriptor instead.

func (BandwidthLimit_EnableMode) Number

func (BandwidthLimit_EnableMode) String

func (x BandwidthLimit_EnableMode) String() string

func (BandwidthLimit_EnableMode) Type

Jump to

Keyboard shortcuts

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