proxy

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(req *fasthttp.Request, resp *fasthttp.Response) error
}

type Pool

type Pool interface {
	// Get returns a new ReverseProxy from the pool.
	Get() (HTTPClient, error)

	// Put the ReverseProxy puts it back to the Pool.
	Put(HTTPClient) error

	// Close closes the pool and all its connections. After Close() the pool is
	// no longer usable.
	Close()

	// Len returns the current number of connections of the pool.
	Len() int
}

func NewChanPool

func NewChanPool(initialCap, maxCap int, hostAddr string, server *config.Server) (Pool, error)

NewChanPool to new a pool with some params

Jump to

Keyboard shortcuts

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