proxy

package
v0.0.0-...-318b7a7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProxyURL                   string
	ProxyMethod                string
	Port                       string
	LogLevel                   string
	AuthorizationSecret        string
	BlockedIps                 []string
	AlwaysAllowedIps           []string
	LeakyBucketLimitPerSecond  int
	SoftCapIPRequestsPerMinute int
	HardCapIPRequestsPerMinute int
	SlackWebhookURL            string
	SlackChannel               string
}

Config ...

type Proxy

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

Proxy ...

func NewProxy

func NewProxy(config *Config) *Proxy

NewProxy ...

func (*Proxy) HealthCheckHandler

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

HealthCheckHandler ...

func (*Proxy) PingHandler

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

PingHandler ...

func (*Proxy) ProxyHandler

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

ProxyHandler ...

func (*Proxy) Start

func (p *Proxy) Start() error

Start ...

Jump to

Keyboard shortcuts

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