proxy

package
v1.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiHostReverseProxy

type MultiHostReverseProxy struct {
	httputil.ReverseProxy
	// Directors holds policy        route type        method    endpoint         Director
	Directors      map[string]map[config.RouteType]map[string]map[string]func(req *http.Request)
	PolicySelector policy.Selector
	// contains filtered or unexported fields
}

MultiHostReverseProxy extends "httputil" to support multiple hosts with different policies

func NewMultiHostReverseProxy

func NewMultiHostReverseProxy(opts ...Option) (*MultiHostReverseProxy, error)

NewMultiHostReverseProxy creates a new MultiHostReverseProxy

func (*MultiHostReverseProxy) ServeHTTP

type Option

type Option func(o *Options)

Option defines a single option function.

func Config

func Config(val *config.Config) Option

Config provides a function to set the config option.

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the logger option.

type Options

type Options struct {
	Logger log.Logger
	Config *config.Config
}

Options defines the available options for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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