Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryMethod ¶ added in v1.6.0
type FactoryMethod func(metadata middleware.Metadata) (httpMiddleware.Middleware, error)
FactoryMethod is the method creating middleware from metadata.
type Registry ¶
Registry is the interface for callers to get registered HTTP middleware.
var DefaultRegistry *Registry
DefaultRegistry is the singleton with the registry.
func (*Registry) Create ¶
func (p *Registry) Create(name, version string, metadata middleware.Metadata) (httpMiddleware.Middleware, error)
Create instantiates a HTTP middleware based on `name`.
func (*Registry) RegisterComponent ¶ added in v1.9.0
func (p *Registry) RegisterComponent(componentFactory func(logger.Logger) FactoryMethod, names ...string)
RegisterComponent adds a new HTTP middleware to the registry.
Click to show internal directories.
Click to hide internal directories.