MCPcopy
hub / github.com/AdguardTeam/dnsproxy / Middleware

Interface Middleware

proxy/middleware.go:4–7  ·  view source on GitHub ↗

Middleware is a common middleware interface.

Source from the content-addressed store, hash-verified

2
3// Middleware is a common middleware interface.
4type Middleware interface {
5 // Wrap returns a new handler that wraps the specified handler.
6 Wrap(handler Handler) (wrapped Handler)
7}
8
9// MiddlewareFunc is a function that implements the [Middleware] interface.
10type MiddlewareFunc func(h Handler) (wrapped Handler)

Callers 3

TestMiddleware_WrapFunction · 0.95
createProxyConfigFunction · 0.65

Implementers 2

Defaultinternal/middleware/middleware.go
middlewareratelimit/ratelimit.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…