http_proxy

package
v0.0.0-...-74fc604 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttp2

func NewHttp2(httpProxy *HttpProxy) proxy.Proxy

func NewHttp2TLS

func NewHttp2TLS(cert string, key string, httpProxy *HttpProxy) proxy.Proxy

func NewHttps

func NewHttps(cert string, key string, httpProxy *HttpProxy) proxy.Proxy

Types

type Http2Proxy

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

func (*Http2Proxy) Serve

func (hp *Http2Proxy) Serve(address string, limiter limiter.Limiter, acl limiter.Limiter, breaker breaker.Breaker, balancer balancer.Balancer) error

type HttpProxy

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

func NewHttp

func NewHttp() *HttpProxy

func (*HttpProxy) Serve

func (hp *HttpProxy) Serve(address string, limiter limiter.Limiter, acc limiter.Limiter, breaker breaker.Breaker, balancer balancer.Balancer) error

func (*HttpProxy) ServeHTTP

func (hp *HttpProxy) ServeHTTP(name string, w http.ResponseWriter, r *http.Request)

type Https2Proxy

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

func (*Https2Proxy) Serve

func (hp *Https2Proxy) Serve(address string, limiter limiter.Limiter, acl limiter.Limiter, breaker breaker.Breaker, balancer balancer.Balancer) error

type HttpsProxy

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

func (*HttpsProxy) Serve

func (hp *HttpsProxy) Serve(address string, limiter limiter.Limiter, acl limiter.Limiter, breaker breaker.Breaker, balancer balancer.Balancer) error

type Response

type Response struct {
	StatusCode int
	Headers    http.Header
	Body       []byte
}

func NewResponse

func NewResponse() *Response

func (*Response) Header

func (r *Response) Header() http.Header

func (*Response) Write

func (r *Response) Write(p []byte) (int, error)

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

Jump to

Keyboard shortcuts

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