plugin

package
v1.1.0-experimental Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliReader

type CliReader func(c *cli.Context) (Middleware, error)

Reader constructs the middleware from the CLI interface

type FrontendListeners

type FrontendListeners struct {
	ConnTck           forward.UrlForwardingStateListener
	RbRewriteListener roundrobin.RequestRewriteListener
	RrRewriteListener roundrobin.RequestRewriteListener
}

Holds a bunch of Listeners a frontend might have. This allows callers to consolidate all their listeners in one convenient struct.

type Middleware

type Middleware interface {
	NewHandler(http.Handler) (http.Handler, error)
}

type MiddlewareSpec

type MiddlewareSpec struct {
	Type string
	// Reader function that returns a middleware from another middleware structure
	FromOther interface{}
	// Flags for CLI tool to generate interface
	CliFlags []cli.Flag
	// Function that construtcs a middleware from CLI parameters
	FromCli CliReader
}

Middleware specification, used to construct new middlewares and plug them into CLI API and backends

func (*MiddlewareSpec) FromJSON

func (ms *MiddlewareSpec) FromJSON(data []byte) (Middleware, error)

type Registry

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

Registry contains currently registered middlewares and used to support pluggable middlewares across all modules of the vulcand

func NewRegistry

func NewRegistry() *Registry

func (*Registry) AddNotFoundMiddleware

func (r *Registry) AddNotFoundMiddleware(notFound Middleware) error

func (*Registry) AddSpec

func (r *Registry) AddSpec(s *MiddlewareSpec) error

func (*Registry) GetCacheProvider

func (r *Registry) GetCacheProvider() cacheprovider.T

func (*Registry) GetFrontendListeners

func (r *Registry) GetFrontendListeners() FrontendListeners

func (*Registry) GetIncomingConnectionTracker

func (r *Registry) GetIncomingConnectionTracker() conntracker.ConnectionTracker

func (*Registry) GetNotFoundMiddleware

func (r *Registry) GetNotFoundMiddleware() Middleware

func (*Registry) GetRouter

func (r *Registry) GetRouter() router.Router

func (*Registry) GetSpec

func (r *Registry) GetSpec(middlewareType string) *MiddlewareSpec

func (*Registry) GetSpecs

func (r *Registry) GetSpecs() []*MiddlewareSpec

func (*Registry) SetCacheProvider

func (r *Registry) SetCacheProvider(cacheprovider cacheprovider.T) error

func (*Registry) SetFrontendListeners

func (r *Registry) SetFrontendListeners(frontendListeners FrontendListeners) error

func (*Registry) SetIncomingConnectionTracker

func (r *Registry) SetIncomingConnectionTracker(connTracker conntracker.ConnectionTracker) error

func (*Registry) SetRouter

func (r *Registry) SetRouter(router router.Router) error

type SpecGetter

type SpecGetter func(string) *MiddlewareSpec

Function that returns middleware spec by it's type

Directories

Path Synopsis
This file will be generated to include all customer specific middlewares
This file will be generated to include all customer specific middlewares

Jump to

Keyboard shortcuts

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