ratelimit

package
v1.34.0-20240426201503... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_api_v2_ratelimit_ratelimit_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type RateLimitDescriptor

type RateLimitDescriptor struct {

	// Descriptor entries.
	Entries []*RateLimitDescriptor_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

A RateLimitDescriptor is a list of hierarchical entries that are used by the service to determine the final rate limit key and overall allowed limit. Here are some examples of how they might be used for the domain "envoy".

.. code-block:: cpp

["authenticated": "false"], ["remote_address": "10.0.0.1"]

What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The configuration supplies a default limit for the *remote_address* key. If there is a desire to raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the configuration.

.. code-block:: cpp

["authenticated": "false"], ["path": "/foo/bar"]

What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if configured that way in the service).

.. code-block:: cpp

["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]

What it does: Limits unauthenticated traffic to a specific path for a specific IP address. Like (1) we can raise/block specific IP addresses if we want with an override configuration.

.. code-block:: cpp

["authenticated": "true"], ["client_id": "foo"]

What it does: Limits all traffic for an authenticated client "foo"

.. code-block:: cpp

["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]

What it does: Limits traffic to a specific path for an authenticated client "foo"

The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired. This enables building complex application scenarios with a generic backend.

func (*RateLimitDescriptor) Descriptor deprecated

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

Deprecated: Use RateLimitDescriptor.ProtoReflect.Descriptor instead.

func (*RateLimitDescriptor) GetEntries

func (*RateLimitDescriptor) ProtoMessage

func (*RateLimitDescriptor) ProtoMessage()

func (*RateLimitDescriptor) ProtoReflect

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

func (*RateLimitDescriptor) Reset

func (x *RateLimitDescriptor) Reset()

func (*RateLimitDescriptor) String

func (x *RateLimitDescriptor) String() string

type RateLimitDescriptor_Entry

type RateLimitDescriptor_Entry struct {

	// Descriptor key.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Descriptor value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimitDescriptor_Entry) Descriptor deprecated

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

Deprecated: Use RateLimitDescriptor_Entry.ProtoReflect.Descriptor instead.

func (*RateLimitDescriptor_Entry) GetKey

func (x *RateLimitDescriptor_Entry) GetKey() string

func (*RateLimitDescriptor_Entry) GetValue

func (x *RateLimitDescriptor_Entry) GetValue() string

func (*RateLimitDescriptor_Entry) ProtoMessage

func (*RateLimitDescriptor_Entry) ProtoMessage()

func (*RateLimitDescriptor_Entry) ProtoReflect

func (*RateLimitDescriptor_Entry) Reset

func (x *RateLimitDescriptor_Entry) Reset()

func (*RateLimitDescriptor_Entry) String

func (x *RateLimitDescriptor_Entry) String() string

Jump to

Keyboard shortcuts

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