Documentation ¶
Index ¶
- Variables
- type RateLimitDescriptor
- func (*RateLimitDescriptor) Descriptor() ([]byte, []int)
- func (m *RateLimitDescriptor) GetEntries() []*RateLimitDescriptor_Entry
- func (m *RateLimitDescriptor) Marshal() (dAtA []byte, err error)
- func (m *RateLimitDescriptor) MarshalTo(dAtA []byte) (int, error)
- func (m *RateLimitDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RateLimitDescriptor) ProtoMessage()
- func (m *RateLimitDescriptor) Reset()
- func (m *RateLimitDescriptor) Size() (n int)
- func (m *RateLimitDescriptor) String() string
- func (m *RateLimitDescriptor) Unmarshal(dAtA []byte) error
- func (m *RateLimitDescriptor) Validate() error
- func (m *RateLimitDescriptor) XXX_DiscardUnknown()
- func (m *RateLimitDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RateLimitDescriptor) XXX_Merge(src proto.Message)
- func (m *RateLimitDescriptor) XXX_Size() int
- func (m *RateLimitDescriptor) XXX_Unmarshal(b []byte) error
- type RateLimitDescriptorValidationError
- func (e RateLimitDescriptorValidationError) Cause() error
- func (e RateLimitDescriptorValidationError) Error() string
- func (e RateLimitDescriptorValidationError) ErrorName() string
- func (e RateLimitDescriptorValidationError) Field() string
- func (e RateLimitDescriptorValidationError) Key() bool
- func (e RateLimitDescriptorValidationError) Reason() string
- type RateLimitDescriptor_Entry
- func (*RateLimitDescriptor_Entry) Descriptor() ([]byte, []int)
- func (m *RateLimitDescriptor_Entry) GetKey() string
- func (m *RateLimitDescriptor_Entry) GetValue() string
- func (m *RateLimitDescriptor_Entry) Marshal() (dAtA []byte, err error)
- func (m *RateLimitDescriptor_Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *RateLimitDescriptor_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RateLimitDescriptor_Entry) ProtoMessage()
- func (m *RateLimitDescriptor_Entry) Reset()
- func (m *RateLimitDescriptor_Entry) Size() (n int)
- func (m *RateLimitDescriptor_Entry) String() string
- func (m *RateLimitDescriptor_Entry) Unmarshal(dAtA []byte) error
- func (m *RateLimitDescriptor_Entry) Validate() error
- func (m *RateLimitDescriptor_Entry) XXX_DiscardUnknown()
- func (m *RateLimitDescriptor_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RateLimitDescriptor_Entry) XXX_Merge(src proto.Message)
- func (m *RateLimitDescriptor_Entry) XXX_Size() int
- func (m *RateLimitDescriptor_Entry) XXX_Unmarshal(b []byte) error
- type RateLimitDescriptor_EntryValidationError
- func (e RateLimitDescriptor_EntryValidationError) Cause() error
- func (e RateLimitDescriptor_EntryValidationError) Error() string
- func (e RateLimitDescriptor_EntryValidationError) ErrorName() string
- func (e RateLimitDescriptor_EntryValidationError) Field() string
- func (e RateLimitDescriptor_EntryValidationError) Key() bool
- func (e RateLimitDescriptor_EntryValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthRatelimit = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRatelimit = fmt.Errorf("proto: integer overflow") )
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*RateLimitDescriptor) Descriptor() ([]byte, []int)
func (*RateLimitDescriptor) GetEntries ¶
func (m *RateLimitDescriptor) GetEntries() []*RateLimitDescriptor_Entry
func (*RateLimitDescriptor) Marshal ¶
func (m *RateLimitDescriptor) Marshal() (dAtA []byte, err error)
func (*RateLimitDescriptor) MarshalTo ¶
func (m *RateLimitDescriptor) MarshalTo(dAtA []byte) (int, error)
func (*RateLimitDescriptor) MarshalToSizedBuffer ¶
func (m *RateLimitDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RateLimitDescriptor) ProtoMessage ¶
func (*RateLimitDescriptor) ProtoMessage()
func (*RateLimitDescriptor) Reset ¶
func (m *RateLimitDescriptor) Reset()
func (*RateLimitDescriptor) Size ¶
func (m *RateLimitDescriptor) Size() (n int)
func (*RateLimitDescriptor) String ¶
func (m *RateLimitDescriptor) String() string
func (*RateLimitDescriptor) Unmarshal ¶
func (m *RateLimitDescriptor) Unmarshal(dAtA []byte) error
func (*RateLimitDescriptor) Validate ¶
func (m *RateLimitDescriptor) Validate() error
Validate checks the field values on RateLimitDescriptor with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*RateLimitDescriptor) XXX_DiscardUnknown ¶
func (m *RateLimitDescriptor) XXX_DiscardUnknown()
func (*RateLimitDescriptor) XXX_Marshal ¶
func (m *RateLimitDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RateLimitDescriptor) XXX_Merge ¶
func (m *RateLimitDescriptor) XXX_Merge(src proto.Message)
func (*RateLimitDescriptor) XXX_Size ¶
func (m *RateLimitDescriptor) XXX_Size() int
func (*RateLimitDescriptor) XXX_Unmarshal ¶
func (m *RateLimitDescriptor) XXX_Unmarshal(b []byte) error
type RateLimitDescriptorValidationError ¶
type RateLimitDescriptorValidationError struct {
// contains filtered or unexported fields
}
RateLimitDescriptorValidationError is the validation error returned by RateLimitDescriptor.Validate if the designated constraints aren't met.
func (RateLimitDescriptorValidationError) Cause ¶
func (e RateLimitDescriptorValidationError) Cause() error
Cause function returns cause value.
func (RateLimitDescriptorValidationError) Error ¶
func (e RateLimitDescriptorValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitDescriptorValidationError) ErrorName ¶
func (e RateLimitDescriptorValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitDescriptorValidationError) Field ¶
func (e RateLimitDescriptorValidationError) Field() string
Field function returns field value.
func (RateLimitDescriptorValidationError) Key ¶
func (e RateLimitDescriptorValidationError) Key() bool
Key function returns key value.
func (RateLimitDescriptorValidationError) Reason ¶
func (e RateLimitDescriptorValidationError) Reason() string
Reason function returns reason value.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RateLimitDescriptor_Entry) Descriptor ¶
func (*RateLimitDescriptor_Entry) Descriptor() ([]byte, []int)
func (*RateLimitDescriptor_Entry) GetKey ¶
func (m *RateLimitDescriptor_Entry) GetKey() string
func (*RateLimitDescriptor_Entry) GetValue ¶
func (m *RateLimitDescriptor_Entry) GetValue() string
func (*RateLimitDescriptor_Entry) Marshal ¶
func (m *RateLimitDescriptor_Entry) Marshal() (dAtA []byte, err error)
func (*RateLimitDescriptor_Entry) MarshalTo ¶
func (m *RateLimitDescriptor_Entry) MarshalTo(dAtA []byte) (int, error)
func (*RateLimitDescriptor_Entry) MarshalToSizedBuffer ¶
func (m *RateLimitDescriptor_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RateLimitDescriptor_Entry) ProtoMessage ¶
func (*RateLimitDescriptor_Entry) ProtoMessage()
func (*RateLimitDescriptor_Entry) Reset ¶
func (m *RateLimitDescriptor_Entry) Reset()
func (*RateLimitDescriptor_Entry) Size ¶
func (m *RateLimitDescriptor_Entry) Size() (n int)
func (*RateLimitDescriptor_Entry) String ¶
func (m *RateLimitDescriptor_Entry) String() string
func (*RateLimitDescriptor_Entry) Unmarshal ¶
func (m *RateLimitDescriptor_Entry) Unmarshal(dAtA []byte) error
func (*RateLimitDescriptor_Entry) Validate ¶
func (m *RateLimitDescriptor_Entry) Validate() error
Validate checks the field values on RateLimitDescriptor_Entry with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*RateLimitDescriptor_Entry) XXX_DiscardUnknown ¶
func (m *RateLimitDescriptor_Entry) XXX_DiscardUnknown()
func (*RateLimitDescriptor_Entry) XXX_Marshal ¶
func (m *RateLimitDescriptor_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RateLimitDescriptor_Entry) XXX_Merge ¶
func (m *RateLimitDescriptor_Entry) XXX_Merge(src proto.Message)
func (*RateLimitDescriptor_Entry) XXX_Size ¶
func (m *RateLimitDescriptor_Entry) XXX_Size() int
func (*RateLimitDescriptor_Entry) XXX_Unmarshal ¶
func (m *RateLimitDescriptor_Entry) XXX_Unmarshal(b []byte) error
type RateLimitDescriptor_EntryValidationError ¶
type RateLimitDescriptor_EntryValidationError struct {
// contains filtered or unexported fields
}
RateLimitDescriptor_EntryValidationError is the validation error returned by RateLimitDescriptor_Entry.Validate if the designated constraints aren't met.
func (RateLimitDescriptor_EntryValidationError) Cause ¶
func (e RateLimitDescriptor_EntryValidationError) Cause() error
Cause function returns cause value.
func (RateLimitDescriptor_EntryValidationError) Error ¶
func (e RateLimitDescriptor_EntryValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitDescriptor_EntryValidationError) ErrorName ¶
func (e RateLimitDescriptor_EntryValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitDescriptor_EntryValidationError) Field ¶
func (e RateLimitDescriptor_EntryValidationError) Field() string
Field function returns field value.
func (RateLimitDescriptor_EntryValidationError) Key ¶
func (e RateLimitDescriptor_EntryValidationError) Key() bool
Key function returns key value.
func (RateLimitDescriptor_EntryValidationError) Reason ¶
func (e RateLimitDescriptor_EntryValidationError) Reason() string
Reason function returns reason value.