server

package
v1.6.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 53 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHeaderRewriter added in v1.4.0

func NewHeaderRewriter(trustedIPs []string, insecure bool) (forward.ReqRewriter, error)

NewHeaderRewriter Create a header rewriter

Types

type RecordingErrorHandler added in v1.4.0

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

RecordingErrorHandler is an error handler, implementing the vulcand/oxy error handler interface, which is recording network errors by using the netErrorRecorder. In addition it sets a proper HTTP status code and body, depending on the type of error occurred.

func NewRecordingErrorHandler added in v1.4.0

func NewRecordingErrorHandler(recorder middlewares.NetErrorRecorder) *RecordingErrorHandler

NewRecordingErrorHandler creates and returns a new instance of RecordingErrorHandler.

func (*RecordingErrorHandler) ServeHTTP added in v1.4.0

func (eh *RecordingErrorHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, err error)

type Server

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

Server is the reverse-proxy/load-balancer engine

func NewServer

func NewServer(globalConfiguration configuration.GlobalConfiguration, provider provider.Provider) *Server

NewServer returns an initialized Server.

func (*Server) AddListener added in v1.6.0

func (s *Server) AddListener(listener func(types.Configuration))

AddListener adds a new listener function used when new configuration is provided

func (*Server) Close

func (s *Server) Close()

Close destroys the server

func (*Server) Start

func (s *Server) Start()

Start starts the server.

func (*Server) StartWithContext added in v1.6.0

func (s *Server) StartWithContext(ctx context.Context)

StartWithContext starts the server and Stop/Close it when context is Done

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server

func (*Server) Wait

func (s *Server) Wait()

Wait blocks until server is shutted down.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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