middleware

package
v0.78.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivityStreamServerInterceptor added in v0.31.0

func ActivityStreamServerInterceptor(activityClient *activity.Client) grpc.StreamServerInterceptor

func ActivityUnaryServerInterceptor added in v0.31.0

func ActivityUnaryServerInterceptor(activityClient *activity.Client) grpc.UnaryServerInterceptor

func Check added in v0.42.0

func Check(checkFn CheckFunc, next http.Handler) httputil.Handler

Check is a middleware that only calls the next handler if the checkFn succeeds. If the checkFn fails, the error is written to the response as per the behavior of httputil.Handler.

func TimeoutMCPMiddleware added in v0.78.0

func TimeoutMCPMiddleware(fn func(method, tool string) time.Duration) mcp.Middleware

func TimeoutStreamServerInterceptor

func TimeoutStreamServerInterceptor(fn func(method string) time.Duration) grpc.StreamServerInterceptor

func TimeoutUnaryServerInterceptor

func TimeoutUnaryServerInterceptor(fn func(method string) time.Duration) grpc.UnaryServerInterceptor

func TraceMiddleware added in v0.78.0

func TraceMiddleware(next http.Handler) http.Handler

traceMiddleware adds trace ID headers to the response if a trace is in progress

Types

type CheckFunc added in v0.42.0

type CheckFunc func(req *http.Request) error

Jump to

Keyboard shortcuts

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