revproxy

package
v0.0.0-...-519bf1e Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalRevProxy

func LocalRevProxy(reqCh <-chan *Request, statCh chan<- time.Duration, proxy *httputil.ReverseProxy,
	ctx context.Context, wg *sync.WaitGroup)

func RevProxyLoop

func RevProxyLoop(reqCh <-chan *Request, statCh chan<- time.Duration,
	proxy *httputil.ReverseProxy, ctx context.Context, wg *sync.WaitGroup, myNodeId string, componentName string)

Types

type Dispenser

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

func NewDispenser

func NewDispenser(maxConcurrency int, reqCh <-chan *GetProxyRequest,
	myNodeId string, componentName string,
	proxy *httputil.ReverseProxy, statCh chan<- time.Duration, ctx context.Context) *Dispenser

func (*Dispenser) Run

func (d *Dispenser) Run(ctx context.Context, reqWaitGroup *sync.WaitGroup)

type GetProxyRequest

type GetProxyRequest struct {
	Proxy chan Proxy
}

func NewGetProxyRequest

func NewGetProxyRequest() *GetProxyRequest

type Proxy

type Proxy func(req *Request)

type ProxyBufferPool

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

func NewProxyBufferPool

func NewProxyBufferPool() *ProxyBufferPool

func (*ProxyBufferPool) Get

func (p *ProxyBufferPool) Get() []byte

func (*ProxyBufferPool) Put

func (p *ProxyBufferPool) Put(b []byte)

type Request

type Request struct {
	Req         *http.Request
	Rw          http.ResponseWriter
	Component   *v1.Component
	StartTime   time.Time
	PreferLocal bool
	Done        chan bool
}

func NewRequest

func NewRequest(req *http.Request, rw http.ResponseWriter, comp *v1.Component, preferLocal bool) *Request

Jump to

Keyboard shortcuts

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