Documentation ¶
Index ¶
- Variables
- type RateLimitOptions
- func (*RateLimitOptions) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimitOptions) GetLimit() uint64
- func (x *RateLimitOptions) GetMessage() string
- func (x *RateLimitOptions) GetMetadataKey() string
- func (*RateLimitOptions) ProtoMessage()
- func (x *RateLimitOptions) ProtoReflect() protoreflect.Message
- func (x *RateLimitOptions) Reset()
- func (x *RateLimitOptions) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The rate limiting options for this method. // // repeated ratelimit.RateLimitOptions options = 50000; E_Options = &file_ratelimit_ratelimit_proto_extTypes[0] )
Extension fields to descriptorpb.MethodOptions.
View Source
var File_ratelimit_ratelimit_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type RateLimitOptions ¶
type RateLimitOptions struct { // The maximum number of requests that can be per minute. Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` // The metadata key to use for rate limiting - if the key is not present in the metadata, the request will not be rate limited. MetadataKey string `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` // The message to return when the rate limit is exceeded(Defaults to "Rate limit exceeded"). Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The options for rate limiting a method.
func (*RateLimitOptions) Descriptor
deprecated
func (*RateLimitOptions) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitOptions.ProtoReflect.Descriptor instead.
func (*RateLimitOptions) GetLimit ¶
func (x *RateLimitOptions) GetLimit() uint64
func (*RateLimitOptions) GetMessage ¶
func (x *RateLimitOptions) GetMessage() string
func (*RateLimitOptions) GetMetadataKey ¶
func (x *RateLimitOptions) GetMetadataKey() string
func (*RateLimitOptions) ProtoMessage ¶
func (*RateLimitOptions) ProtoMessage()
func (*RateLimitOptions) ProtoReflect ¶
func (x *RateLimitOptions) ProtoReflect() protoreflect.Message
func (*RateLimitOptions) Reset ¶
func (x *RateLimitOptions) Reset()
func (*RateLimitOptions) String ¶
func (x *RateLimitOptions) String() string
Click to show internal directories.
Click to hide internal directories.