package ratelimitv3
import "github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3"
Index ¶
- Variables
- type RateLimitConfig
- func (*RateLimitConfig) Descriptor() ([]byte, []int)
- func (x *RateLimitConfig) GetDescriptors() []*RateLimitDescriptor
- func (x *RateLimitConfig) GetDomain() string
- func (x *RateLimitConfig) GetName() string
- func (*RateLimitConfig) ProtoMessage()
- func (x *RateLimitConfig) ProtoReflect() protoreflect.Message
- func (x *RateLimitConfig) Reset()
- func (x *RateLimitConfig) String() string
- type RateLimitDescriptor
- func (*RateLimitDescriptor) Descriptor() ([]byte, []int)
- func (x *RateLimitDescriptor) GetDescriptors() []*RateLimitDescriptor
- func (x *RateLimitDescriptor) GetDetailedMetric() bool
- func (x *RateLimitDescriptor) GetKey() string
- func (x *RateLimitDescriptor) GetRateLimit() *RateLimitPolicy
- func (x *RateLimitDescriptor) GetShadowMode() bool
- func (x *RateLimitDescriptor) GetValue() string
- func (*RateLimitDescriptor) ProtoMessage()
- func (x *RateLimitDescriptor) ProtoReflect() protoreflect.Message
- func (x *RateLimitDescriptor) Reset()
- func (x *RateLimitDescriptor) String() string
- type RateLimitPolicy
- func (*RateLimitPolicy) Descriptor() ([]byte, []int)
- func (x *RateLimitPolicy) GetName() string
- func (x *RateLimitPolicy) GetReplaces() []*RateLimitReplace
- func (x *RateLimitPolicy) GetRequestsPerUnit() uint32
- func (x *RateLimitPolicy) GetUnit() RateLimitUnit
- func (x *RateLimitPolicy) GetUnlimited() bool
- func (*RateLimitPolicy) ProtoMessage()
- func (x *RateLimitPolicy) ProtoReflect() protoreflect.Message
- func (x *RateLimitPolicy) Reset()
- func (x *RateLimitPolicy) String() string
- type RateLimitReplace
- func (*RateLimitReplace) Descriptor() ([]byte, []int)
- func (x *RateLimitReplace) GetName() string
- func (*RateLimitReplace) ProtoMessage()
- func (x *RateLimitReplace) ProtoReflect() protoreflect.Message
- func (x *RateLimitReplace) Reset()
- func (x *RateLimitReplace) String() string
- type RateLimitUnit
- func (RateLimitUnit) Descriptor() protoreflect.EnumDescriptor
- func (x RateLimitUnit) Enum() *RateLimitUnit
- func (RateLimitUnit) EnumDescriptor() ([]byte, []int)
- func (x RateLimitUnit) Number() protoreflect.EnumNumber
- func (x RateLimitUnit) String() string
- func (RateLimitUnit) Type() protoreflect.EnumType
Variables ¶
var ( RateLimitUnit_name = map[int32]string{ 0: "UNKNOWN", 1: "SECOND", 2: "MINUTE", 3: "HOUR", 4: "DAY", } RateLimitUnit_value = map[string]int32{ "UNKNOWN": 0, "SECOND": 1, "MINUTE": 2, "HOUR": 3, "DAY": 4, } )
Enum value maps for RateLimitUnit.
var File_ratelimit_config_ratelimit_v3_rls_conf_proto protoreflect.FileDescriptor
Types ¶
type RateLimitConfig ¶
type RateLimitConfig struct { // Name of the rate limit configuration. This should be unique for each configuration. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Domain name for the rate limit configuration. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // List of rate limit configuration descriptors. Descriptors []*RateLimitDescriptor `protobuf:"bytes,3,rep,name=descriptors,proto3" json:"descriptors,omitempty"` // contains filtered or unexported fields }
Rate limit configuration for a single domain.
func (*RateLimitConfig) Descriptor ¶
func (*RateLimitConfig) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitConfig.ProtoReflect.Descriptor instead.
func (*RateLimitConfig) GetDescriptors ¶
func (x *RateLimitConfig) GetDescriptors() []*RateLimitDescriptor
func (*RateLimitConfig) GetDomain ¶
func (x *RateLimitConfig) GetDomain() string
func (*RateLimitConfig) GetName ¶
func (x *RateLimitConfig) GetName() string
func (*RateLimitConfig) ProtoMessage ¶
func (*RateLimitConfig) ProtoMessage()
func (*RateLimitConfig) ProtoReflect ¶
func (x *RateLimitConfig) ProtoReflect() protoreflect.Message
func (*RateLimitConfig) Reset ¶
func (x *RateLimitConfig) Reset()
func (*RateLimitConfig) String ¶
func (x *RateLimitConfig) String() string
type RateLimitDescriptor ¶
type RateLimitDescriptor struct { // Key of the descriptor. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Optional value of the descriptor. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Rate limit policy of the descriptor. RateLimit *RateLimitPolicy `protobuf:"bytes,3,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"` // List of sub rate limit descriptors. Descriptors []*RateLimitDescriptor `protobuf:"bytes,4,rep,name=descriptors,proto3" json:"descriptors,omitempty"` // Mark the descriptor as shadow. When the values is true, rate limit service allow requests to the backend. ShadowMode bool `protobuf:"varint,5,opt,name=shadow_mode,json=shadowMode,proto3" json:"shadow_mode,omitempty"` // Setting the `detailed_metric: true` for a descriptor will extend the metrics that are produced. DetailedMetric bool `protobuf:"varint,6,opt,name=detailed_metric,json=detailedMetric,proto3" json:"detailed_metric,omitempty"` // contains filtered or unexported fields }
Rate limit configuration descriptor.
func (*RateLimitDescriptor) Descriptor ¶
func (*RateLimitDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitDescriptor.ProtoReflect.Descriptor instead.
func (*RateLimitDescriptor) GetDescriptors ¶
func (x *RateLimitDescriptor) GetDescriptors() []*RateLimitDescriptor
func (*RateLimitDescriptor) GetDetailedMetric ¶
func (x *RateLimitDescriptor) GetDetailedMetric() bool
func (*RateLimitDescriptor) GetKey ¶
func (x *RateLimitDescriptor) GetKey() string
func (*RateLimitDescriptor) GetRateLimit ¶
func (x *RateLimitDescriptor) GetRateLimit() *RateLimitPolicy
func (*RateLimitDescriptor) GetShadowMode ¶
func (x *RateLimitDescriptor) GetShadowMode() bool
func (*RateLimitDescriptor) GetValue ¶
func (x *RateLimitDescriptor) GetValue() string
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 RateLimitPolicy ¶
type RateLimitPolicy struct { // Unit of time for the rate limit. Unit RateLimitUnit `protobuf:"varint,1,opt,name=unit,proto3,enum=ratelimit.config.ratelimit.v3.RateLimitUnit" json:"unit,omitempty"` // Number of requests allowed in the policy within `unit` time. RequestsPerUnit uint32 `protobuf:"varint,2,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"` // Mark the rate limit policy as unlimited. All requests are allowed to the backend. Unlimited bool `protobuf:"varint,3,opt,name=unlimited,proto3" json:"unlimited,omitempty"` // Optional name for the rate limit policy. Name the policy, if it should be replaced (dropped evaluation) by // another policy. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // List of rate limit policies, this rate limit policy will replace (drop evaluation) // For more information: https://github.com/envoyproxy/ratelimit/tree/0b2f4d5fb04bf55e1873e2c5e2bb28da67c0643f#replaces // Example: https://github.com/envoyproxy/ratelimit/tree/0b2f4d5fb04bf55e1873e2c5e2bb28da67c0643f#example-7 Replaces []*RateLimitReplace `protobuf:"bytes,5,rep,name=replaces,proto3" json:"replaces,omitempty"` // contains filtered or unexported fields }
Rate-limit policy.
func (*RateLimitPolicy) Descriptor ¶
func (*RateLimitPolicy) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitPolicy.ProtoReflect.Descriptor instead.
func (*RateLimitPolicy) GetName ¶
func (x *RateLimitPolicy) GetName() string
func (*RateLimitPolicy) GetReplaces ¶
func (x *RateLimitPolicy) GetReplaces() []*RateLimitReplace
func (*RateLimitPolicy) GetRequestsPerUnit ¶
func (x *RateLimitPolicy) GetRequestsPerUnit() uint32
func (*RateLimitPolicy) GetUnit ¶
func (x *RateLimitPolicy) GetUnit() RateLimitUnit
func (*RateLimitPolicy) GetUnlimited ¶
func (x *RateLimitPolicy) GetUnlimited() bool
func (*RateLimitPolicy) ProtoMessage ¶
func (*RateLimitPolicy) ProtoMessage()
func (*RateLimitPolicy) ProtoReflect ¶
func (x *RateLimitPolicy) ProtoReflect() protoreflect.Message
func (*RateLimitPolicy) Reset ¶
func (x *RateLimitPolicy) Reset()
func (*RateLimitPolicy) String ¶
func (x *RateLimitPolicy) String() string
type RateLimitReplace ¶
type RateLimitReplace struct { // Name of the rate limit policy, that is being replaced (dropped evaluation). Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Replace specifies the rate limit policy that should be replaced (dropped evaluation). For more information: https://github.com/envoyproxy/ratelimit/tree/0b2f4d5fb04bf55e1873e2c5e2bb28da67c0643f#replaces
func (*RateLimitReplace) Descriptor ¶
func (*RateLimitReplace) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitReplace.ProtoReflect.Descriptor instead.
func (*RateLimitReplace) GetName ¶
func (x *RateLimitReplace) GetName() string
func (*RateLimitReplace) ProtoMessage ¶
func (*RateLimitReplace) ProtoMessage()
func (*RateLimitReplace) ProtoReflect ¶
func (x *RateLimitReplace) ProtoReflect() protoreflect.Message
func (*RateLimitReplace) Reset ¶
func (x *RateLimitReplace) Reset()
func (*RateLimitReplace) String ¶
func (x *RateLimitReplace) String() string
type RateLimitUnit ¶
type RateLimitUnit int32
Identifies the unit of of time for rate limit.
const ( // The time unit is not known. RateLimitUnit_UNKNOWN RateLimitUnit = 0 // The time unit representing a second. RateLimitUnit_SECOND RateLimitUnit = 1 // The time unit representing a minute. RateLimitUnit_MINUTE RateLimitUnit = 2 // The time unit representing an hour. RateLimitUnit_HOUR RateLimitUnit = 3 // The time unit representing a day. RateLimitUnit_DAY RateLimitUnit = 4 )
func (RateLimitUnit) Descriptor ¶
func (RateLimitUnit) Descriptor() protoreflect.EnumDescriptor
func (RateLimitUnit) Enum ¶
func (x RateLimitUnit) Enum() *RateLimitUnit
func (RateLimitUnit) EnumDescriptor ¶
func (RateLimitUnit) EnumDescriptor() ([]byte, []int)
Deprecated: Use RateLimitUnit.Descriptor instead.
func (RateLimitUnit) Number ¶
func (x RateLimitUnit) Number() protoreflect.EnumNumber
func (RateLimitUnit) String ¶
func (x RateLimitUnit) String() string
func (RateLimitUnit) Type ¶
func (RateLimitUnit) Type() protoreflect.EnumType
Source Files ¶
- Version
- v0.13.1
- Published
- Oct 15, 2024
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 2 hours ago –
Tools for package owners.