middleware

package
v2.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 39 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder the middleware builder.

func NewBuilder

func NewBuilder(configs map[string]*runtime.MiddlewareInfo, serviceBuilder serviceBuilder, pluginBuilder PluginsBuilder) *Builder

NewBuilder creates a new Builder.

func (*Builder) BuildChain

func (b *Builder) BuildChain(ctx context.Context, middlewares []string) *alice.Chain

BuildChain creates a middleware chain.

type ChainBuilder

type ChainBuilder struct {
	// contains filtered or unexported fields
}

ChainBuilder Creates a middleware chain by entry point. It is used for middlewares that are created almost systematically and that need to be created before all others.

func NewChainBuilder

func NewChainBuilder(metricsRegistry metrics.Registry, accessLoggerMiddleware *accesslog.Handler, tracer *tracing.Tracing) *ChainBuilder

NewChainBuilder Creates a new ChainBuilder.

func (*ChainBuilder) Build

func (c *ChainBuilder) Build(ctx context.Context, entryPointName string) alice.Chain

Build a middleware chain by entry point.

func (*ChainBuilder) Close

func (c *ChainBuilder) Close()

Close accessLogger and tracer.

type PluginsBuilder

type PluginsBuilder interface {
	Build(pName string, config map[string]interface{}, middlewareName string) (plugins.Constructor, error)
}

PluginsBuilder the plugin's builder interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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