http

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

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

type Registry struct {
	Logger logger.Logger
	// contains filtered or unexported fields
}

Registry is the interface for callers to get registered HTTP middleware.

var DefaultRegistry *Registry

DefaultRegistry is the singleton with the registry.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns a new HTTP middleware 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.

Jump to

Keyboard shortcuts

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