proxy

package
v0.0.0-...-504ad5f Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	SSL           bool
	Debug         bool
	ListenAddress *models.ListenAddress
	Routes        []*models.Route
	Server        *http.Server
	Config        *models.Config
	Loglevel      log.Level
}

HTTPServer http server

func (*HTTPServer) Director

func (httpServer *HTTPServer) Director(req *http.Request)

Director directs

func (*HTTPServer) ModifyResponse

func (httpServer *HTTPServer) ModifyResponse(r *http.Response) error

ModifyResponse modifies the response from redirected request to client

func (*HTTPServer) RoundTrip

func (httpServer *HTTPServer) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip trips stuff around

func (*HTTPServer) Start

func (httpServer *HTTPServer) Start()

Start starts the server

type ReverseProxyServer

type ReverseProxyServer struct {
	Config *models.Config
	Routes []models.Route
	Server []HTTPServer
	Debug  bool
}

ReverseProxyServer a reverseproxy server

func NewReverseProxyServere

func NewReverseProxyServere(config *models.Config, routes []models.Route) *ReverseProxyServer

NewReverseProxyServere create a new reverseproxy server

func (*ReverseProxyServer) InitHTTPServers

func (server *ReverseProxyServer) InitHTTPServers()

InitHTTPServers inits all http servers

func (*ReverseProxyServer) Start

func (server *ReverseProxyServer) Start()

Start starts the server

func (*ReverseProxyServer) WaitForShutdown

func (server *ReverseProxyServer) WaitForShutdown()

WaitForShutdown waiting for shutdown

Jump to

Keyboard shortcuts

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