proxy

package
v0.0.0-...-c70600a Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option configures a Proxy at construction time.

func WithHealthCheckInterval

func WithHealthCheckInterval(d time.Duration) Option

func WithHealthCheckPath

func WithHealthCheckPath(path string) Option

func WithLoadBalancerStrategy

func WithLoadBalancerStrategy(s balancer.LoadBalancerStrategy) Option

func WithLogger

func WithLogger(l *slog.Logger) Option

func WithWeights

func WithWeights(w map[string]int) Option

type Proxy

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

func New

func New(upstreams []string, opts ...Option) (*Proxy, error)

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Proxy) Stop

func (p *Proxy) Stop()

Jump to

Keyboard shortcuts

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