Documentation
¶
Index ¶
- func CloneURL(u *url.URL) *url.URL
- func DuplicateRequest(request *http.Request) *http.Request
- func InsertForwardedHeaders(request *http.Request)
- func MakeTransport(t time.Duration, closeConnections bool) *http.Transport
- func SetRequestTarget(request *http.Request, b Backend)
- type AlternativeReq
- type Backend
- type Handler
- type Pool
- type Runnable
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DuplicateRequest ¶
DuplicateRequest duplicate http req
func InsertForwardedHeaders ¶
InsertForwardedHeaders insert header X-Forwarded-For and Forwarded headers.
func MakeTransport ¶
MakeTransport makes a new http.Transport.
func SetRequestTarget ¶
SetRequestTarget sets the req URL. this turns a inbound req (a req without URL) into an outbound req.
Types ¶
type AlternativeReq ¶
type AlternativeReq struct {
Handler *Handler
// contains filtered or unexported fields
}
AlternativeReq represents the alternative request.
type Backend ¶
Backend represents the backend server.
func (*Backend) ParseAddress ¶
ParseAddress parses an address to https, host(ip:port)
type Handler ¶
type Handler struct {
Alternatives []Backend
// contains filtered or unexported fields
}
Handler contains the address of the main PrimaryTarget and the one for the Host target
func CreateHandler ¶
type Pool ¶
Pool means the pool that can be run by pooling workers.
func NewWorkerPool ¶
NewWorkerPool creates a limited pool of permissions in order to limit the number of concurrent jobs.
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool carries a pool to deliver job.