handler

package
v0.0.0-...-4e12403 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpResponse

func DumpResponse(resp *http.Response, body bool, b io.Writer) error

DumpResponse is like DumpRequest but dumps a response.

Types

type Config

type Config struct {
	BackendHost    string
	BackendPort    string
	BackendTLSHost string
	BackendTLSPort string
	BackendOnce    bool
	DomainSuffix   string

	RateLimit int

	ReqRemoveHeaders  []string
	RespRemoveHeaders []string

	CustomTags []string

	CacheRules *cacherules.Rules

	Cache *lsm.Config

	Debug bool
}

type Handler

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

func New

func New(cfg *Config) *Handler

func (*Handler) Reload

func (handler *Handler) Reload(cfg *Config)

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(orgW http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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