proxyutil

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package proxyutil handles parsing logic for proxymw configs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFile added in v0.1.14

func ParseFile[T any](configFile string) (cfg T, err error)

func ParseProxyConfigFile added in v0.1.14

func ParseProxyConfigFile(configFile string) (proxymw.Config, error)

Types

type Config

type Config struct {
	// InsecureListenAddress is the address the proxy HTTP server should listen on
	InsecureListenAddress string `yaml:"insecure_listen_addr"`
	// InternalListenAddress is the address the HTTP server should listen on for pprof and metrics
	InternalListenAddress string `yaml:"internal_listen_addr"`
	// Upstream is the upstream URL to proxy to
	Upstream string `yaml:"upstream"`
	// ProxyPaths is the list of paths to throttle with proxy settings
	ProxyPaths []string `yaml:"proxy_paths"`
	// PassthroughPaths is a list of paths to pass through instead of applying proxy settings
	PassthroughPaths []string       `yaml:"passthrough_paths"`
	ProxyConfig      proxymw.Config `yaml:"proxymw_config"`
	ReadTimeout      string         `yaml:"proxy_read_timeout"`
	WriteTimeout     string         `yaml:"proxy_write_timeout"`
}

func ParseConfigEnvironment added in v0.1.14

func ParseConfigEnvironment() (Config, error)

func ParseConfigFile added in v0.1.14

func ParseConfigFile(configFile string) (Config, error)

func ParseConfigFlags added in v0.1.14

func ParseConfigFlags() (Config, error)

type Float64Slice

type Float64Slice []float64

func (*Float64Slice) Set

func (f *Float64Slice) Set(value string) error

func (*Float64Slice) String

func (f *Float64Slice) String() string

type StringSlice

type StringSlice []string

func (*StringSlice) Set

func (s *StringSlice) Set(value string) error

func (*StringSlice) String

func (s *StringSlice) String() string

Directories

Path Synopsis
Package proxyhttp generates an http mux handler to servce requests using *httputil.ReverseProxy
Package proxyhttp generates an http mux handler to servce requests using *httputil.ReverseProxy

Jump to

Keyboard shortcuts

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