middleware

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 45 Imported by: 1

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 ObservabilityMgr

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

ObservabilityMgr is a manager for observability (AccessLogs, Metrics and Tracing) enablement.

func NewObservabilityMgr

func NewObservabilityMgr(config static.Configuration, metricsRegistry metrics.Registry, semConvMetricRegistry *metrics.SemConvMetricsRegistry, accessLoggerMiddleware *accesslog.Handler, tracer *tracing.Tracer, tracerCloser io.Closer) *ObservabilityMgr

NewObservabilityMgr creates a new ObservabilityMgr.

func (*ObservabilityMgr) BuildEPChain

func (o *ObservabilityMgr) BuildEPChain(ctx context.Context, entryPointName string, resourceName string) alice.Chain

BuildEPChain an observability middleware chain by entry point.

func (*ObservabilityMgr) Close

func (o *ObservabilityMgr) Close()

Close closes the accessLogger and tracer.

func (*ObservabilityMgr) MetricsRegistry

func (o *ObservabilityMgr) MetricsRegistry() metrics.Registry

MetricsRegistry is an accessor to the metrics registry.

func (*ObservabilityMgr) RotateAccessLogs

func (o *ObservabilityMgr) RotateAccessLogs() error

func (*ObservabilityMgr) SemConvMetricsRegistry

func (o *ObservabilityMgr) SemConvMetricsRegistry() *metrics.SemConvMetricsRegistry

SemConvMetricsRegistry is an accessor to the semantic conventions metrics registry.

func (*ObservabilityMgr) ShouldAddAccessLogs

func (o *ObservabilityMgr) ShouldAddAccessLogs(resourceName string) bool

ShouldAddAccessLogs returns whether the access logs should be enabled for the given resource.

func (*ObservabilityMgr) ShouldAddMetrics

func (o *ObservabilityMgr) ShouldAddMetrics(resourceName string) bool

ShouldAddMetrics returns whether the metrics should be enabled for the given resource.

func (*ObservabilityMgr) ShouldAddTracing

func (o *ObservabilityMgr) ShouldAddTracing(resourceName string) bool

ShouldAddTracing returns whether the tracing should be enabled for the given resource.

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