middlewares

package
v0.0.0-...-59e6379 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceK key = iota
	ReRouteK
)

Variables

This section is empty.

Functions

func ConvertURL

func ConvertURL(src string) string

func ErrorMiddleware

func ErrorMiddleware(next http.Handler) http.Handler

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

func ReRoutingMiddleware

func ReRoutingMiddleware(next http.Handler) http.Handler

func RequestMiddleware

func RequestMiddleware(next http.Handler) http.Handler

func ResponseMiddleware

func ResponseMiddleware(next http.Handler) http.Handler

func TracingMiddleware

func TracingMiddleware(next http.Handler) http.Handler

Types

type GWContext

type GWContext struct {
	context.Context
	TracingID   string
	ReRouteInfo *ReRouteInfo
}
type Header struct {
	K, V string
}

type ReRouteInfo

type ReRouteInfo struct {
	DestURL     string
	DestHeaders []Header
	RecvData    []byte
}

Jump to

Keyboard shortcuts

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