Documentation ¶
Index ¶
- Constants
- Variables
- func BuildMiddlewares(annotations map[string]string) (map[string]*dynamic.Middleware, error)
- func GetCircuitBreakerExpression(annotations map[string]string) (string, error)
- func GetRateLimitAverage(annotations map[string]string) (int, error)
- func GetRateLimitBurst(annotations map[string]string) (int, error)
- func GetRetryAttempts(annotations map[string]string) (int, error)
- func GetScheme(annotations map[string]string) (string, error)
- func GetTrafficType(defaultTrafficType string, annotations map[string]string) (string, error)
Constants ¶
View Source
const ( // ServiceTypeHTTP HTTP service type. ServiceTypeHTTP string = "http" // ServiceTypeTCP TCP service type. ServiceTypeTCP string = "tcp" // ServiceTypeUDP UDP service type. ServiceTypeUDP string = "udp" // SchemeHTTP HTTP scheme. SchemeHTTP string = "http" // SchemeH2C h2c scheme. SchemeH2C string = "h2c" // SchemeHTTPS HTTPS scheme. SchemeHTTPS string = "https" )
Variables ¶
View Source
var ErrNotFound = errors.New("annotation not found")
ErrNotFound indicates that the annotation hasn't been found.
Functions ¶
func BuildMiddlewares ¶
BuildMiddlewares builds middlewares from the given annotations.
func GetCircuitBreakerExpression ¶
GetCircuitBreakerExpression returns the value of the circuit-breaker-expression annotation.
func GetRateLimitAverage ¶
GetRateLimitAverage returns the value of the rate-limit-average annotation.
func GetRateLimitBurst ¶
GetRateLimitBurst returns the value of the rate-limit-burst annotation.
func GetRetryAttempts ¶
GetRetryAttempts returns the value of the retry-attempts annotation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.