middlewares

package
v4.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const PatternHeader = "pattern"

Variables

View Source
var Etag string

Functions

func AllowCORS

func AllowCORS(h http.Handler) http.Handler

func DeletePatternHeader

func DeletePatternHeader(h http.Handler) http.Handler

func GetPatternHeader

func GetPatternHeader(w http.ResponseWriter) string

func HttpCache

func HttpCache(h http.Handler) http.Handler

func MetricsServerInterceptor

func MetricsServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)

func MetricsStreamServerInterceptor

func MetricsStreamServerInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func Recovery

func Recovery(h http.Handler) http.Handler

func ResponseMetrics

func ResponseMetrics(h http.Handler) http.Handler

func RouteLogger

func RouteLogger(h http.Handler) http.Handler

func SetPatternHeader

func SetPatternHeader(w http.ResponseWriter, val string)

func StreamServerInterceptor added in v4.19.7

func StreamServerInterceptor() grpc.StreamServerInterceptor

func TraceUnaryClientInterceptor

func TraceUnaryClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

func TraceUnaryServerInterceptor

func TraceUnaryServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)

func TracingWrapper

func TracingWrapper(h http.Handler) http.Handler

TracingWrapper [W3C Tracing Headers](https://www.w3.org/TR/trace-context/)

func UnaryServerInterceptor added in v4.19.7

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

Types

type CustomResponseWriter

type CustomResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*CustomResponseWriter) Write

func (c *CustomResponseWriter) Write(bytes []byte) (int, error)

type Validator added in v4.19.7

type Validator interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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