Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParser ¶
func NewParser(br resolver.DefaultBackend) parser.IngressAnnotation
NewParser creates a new ratelimit annotation parser
Types ¶
type RateLimit ¶
type RateLimit struct {
// Connections indicates a limit with the number of connections per IP address
Connections Zone `json:"connections"`
// RPS indicates a limit with the number of connections per second
RPS Zone `json:"rps"`
RPM Zone `json:"rpm"`
LimitRate int `json:"limit-rate"`
LimitRateAfter int `json:"limit-rate-after"`
Name string `json:"name"`
ID string `json:"id"`
Whitelist []string `json:"whitelist"`
}
RateLimit returns rate limit configuration for an Ingress rule limiting the number of connections per IP address and/or connections per second. If you both annotations are specified in a single Ingress rule, RPS limits takes precedence
Click to show internal directories.
Click to hide internal directories.