annotations

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

func BuildMiddlewares(annotations map[string]string) (map[string]*dynamic.Middleware, error)

BuildMiddlewares builds middlewares from the given annotations.

func GetCircuitBreakerExpression

func GetCircuitBreakerExpression(annotations map[string]string) (string, error)

GetCircuitBreakerExpression returns the value of the circuit-breaker-expression annotation.

func GetRateLimitAverage

func GetRateLimitAverage(annotations map[string]string) (int, error)

GetRateLimitAverage returns the value of the rate-limit-average annotation.

func GetRateLimitBurst

func GetRateLimitBurst(annotations map[string]string) (int, error)

GetRateLimitBurst returns the value of the rate-limit-burst annotation.

func GetRetryAttempts

func GetRetryAttempts(annotations map[string]string) (int, error)

GetRetryAttempts returns the value of the retry-attempts annotation.

func GetScheme

func GetScheme(annotations map[string]string) (string, error)

GetScheme returns the value of the scheme annotation.

func GetTrafficType

func GetTrafficType(defaultTrafficType string, annotations map[string]string) (string, error)

GetTrafficType returns the value of the traffic-type annotation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL