Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyCleanup = func() {}
View Source
var EmptyMiddleware = func(tripper http.RoundTripper) http.RoundTripper { return tripper }
View Source
var ErrNotFound = errors.New("Middleware has not been registered")
ErrNotFound is middleware not found.
Functions ¶
Types ¶
type Factory ¶
type Factory func(*configv1.Middleware) (middleware Middleware, cleanup func(), err error)
Factory is a middleware factory.
type Middleware ¶
type Middleware func(http.RoundTripper) http.RoundTripper
Middleware is handler middleware.
func Chain ¶
func Chain(m ...Middleware) Middleware
Chain returns a Middleware that specifies the chained handler for endpoint.
func Create ¶
func Create(c *configv1.Middleware) (Middleware, func(), error)
Create instantiates a middleware based on `cfg`.
type Registry ¶
type Registry interface {
Register(name string, factory Factory)
Create(c *configv1.Middleware) (Middleware, func(), error)
}
type RoundTripperFunc ¶
RoundTripperFunc is an adapter to allow the use of ordinary functions as HTTP RoundTripper.
Directories
¶
| Path | Synopsis |
|---|---|
|
countingWriter counts how many bytes have been written to it.
|
countingWriter counts how many bytes have been written to it. |
Click to show internal directories.
Click to hide internal directories.