local_ratelimitv3

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: 20 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type LocalRateLimit

type LocalRateLimit struct {

	// The prefix to use when emitting :ref:`statistics
	// <config_network_filters_local_rate_limit_stats>`.
	StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// The token bucket configuration to use for rate limiting connections that are processed by the
	// filter's filter chain. Each incoming connection processed by the filter consumes a single
	// token. If the token is available, the connection will be allowed. If no tokens are available,
	// the connection will be immediately closed.
	//
	// .. note::
	//
	//	In the current implementation each filter and filter chain has an independent rate limit, unless
	//	a shared rate limit is configured via :ref:`share_key <envoy_v3_api_field_extensions.filters.network.local_ratelimit.v3.LocalRateLimit.share_key>`.
	//
	// .. note::
	//
	//	In the current implementation the token bucket's :ref:`fill_interval
	//	<envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive
	//	refills.
	TokenBucket *v3.TokenBucket `protobuf:"bytes,2,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"`
	// Runtime flag that controls whether the filter is enabled or not. If not specified, defaults
	// to enabled.
	RuntimeEnabled *v31.RuntimeFeatureFlag `protobuf:"bytes,3,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	// Specifies that the token bucket used for rate limiting should be shared with other local_rate_limit filters
	// with a matching :ref:`token_bucket <envoy_v3_api_field_extensions.filters.network.local_ratelimit.v3.LocalRateLimit.token_bucket>`
	// and “share_key“ configuration. All fields of “token_bucket“ must match exactly for the token bucket to be shared. If this
	// field is empty, this filter will not share a token bucket with any other filter.
	ShareKey string `protobuf:"bytes,4,opt,name=share_key,json=shareKey,proto3" json:"share_key,omitempty"`
	// contains filtered or unexported fields
}

func (*LocalRateLimit) Descriptor deprecated

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

Deprecated: Use LocalRateLimit.ProtoReflect.Descriptor instead.

func (*LocalRateLimit) GetRuntimeEnabled

func (x *LocalRateLimit) GetRuntimeEnabled() *v31.RuntimeFeatureFlag

func (*LocalRateLimit) GetShareKey added in v0.10.2

func (x *LocalRateLimit) GetShareKey() string

func (*LocalRateLimit) GetStatPrefix

func (x *LocalRateLimit) GetStatPrefix() string

func (*LocalRateLimit) GetTokenBucket

func (x *LocalRateLimit) GetTokenBucket() *v3.TokenBucket

func (*LocalRateLimit) ProtoMessage

func (*LocalRateLimit) ProtoMessage()

func (*LocalRateLimit) ProtoReflect added in v0.9.6

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

func (*LocalRateLimit) Reset

func (x *LocalRateLimit) Reset()

func (*LocalRateLimit) String

func (x *LocalRateLimit) String() string

func (*LocalRateLimit) Validate

func (m *LocalRateLimit) Validate() error

Validate checks the field values on LocalRateLimit 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 (*LocalRateLimit) ValidateAll added in v0.10.0

func (m *LocalRateLimit) ValidateAll() error

ValidateAll checks the field values on LocalRateLimit 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 LocalRateLimitMultiError, or nil if none found.

type LocalRateLimitMultiError added in v0.10.0

type LocalRateLimitMultiError []error

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

func (LocalRateLimitMultiError) AllErrors added in v0.10.0

func (m LocalRateLimitMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LocalRateLimitMultiError) Error added in v0.10.0

func (m LocalRateLimitMultiError) Error() string

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

type LocalRateLimitValidationError

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

LocalRateLimitValidationError is the validation error returned by LocalRateLimit.Validate if the designated constraints aren't met.

func (LocalRateLimitValidationError) Cause

Cause function returns cause value.

func (LocalRateLimitValidationError) Error

Error satisfies the builtin error interface

func (LocalRateLimitValidationError) ErrorName

func (e LocalRateLimitValidationError) ErrorName() string

ErrorName returns error name.

func (LocalRateLimitValidationError) Field

Field function returns field value.

func (LocalRateLimitValidationError) Key

Key function returns key value.

func (LocalRateLimitValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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