forwarder

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedPatternMatch  = errors.New("forward pattern match failed")
	ErrFailedTargetExtract = errors.New("could not determine target from context")
	ErrFailedForwarding    = errors.New("failed to forward request")
)

Functions

func Forwarder

func Forwarder(targetContextKey composertypes.ContextKey) http.Handler

Forwarder returns a HTTP handler that forwards any received requests to their designated backends.

func NewComponent

func NewComponent() composertypes.FlowComponent

func Test

func Test() http.Handler

Test is an endpoint to verify metric generation works as expected. Wanted status code is passed as a query parameter. Any body present in the request is echoed back.

Types

type Target

type Target interface {
	Host() string
	Port() int
}

Jump to

Keyboard shortcuts

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