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 contribmiddleware.Metadata) (middleware.HTTP, 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 contribmiddleware.Metadata, logName string) (middleware.HTTP, 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.