server

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: MIT Imports: 47 Imported by: 0

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 OxyLogger

type OxyLogger struct {
}

OxyLogger implements oxy Logger interface with logrus.

func (*OxyLogger) Errorf

func (oxylogger *OxyLogger) Errorf(format string, args ...interface{})

Errorf logs specified string as Warningf level in logrus.

func (*OxyLogger) Infof

func (oxylogger *OxyLogger) Infof(format string, args ...interface{})

Infof logs specified string as Debug level in logrus.

func (*OxyLogger) Warningf

func (oxylogger *OxyLogger) Warningf(format string, args ...interface{})

Warningf logs specified string as Warning level in logrus.

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 Rules

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

Rules holds rule parsing and configuration

func (*Rules) Parse

func (r *Rules) Parse(expression string) (*mux.Route, error)

Parse parses rules expressions

func (*Rules) ParseDomains

func (r *Rules) ParseDomains(expression string) ([]string, error)

ParseDomains parses rules expressions and returns domains

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) *Server

NewServer returns an initialized Server.

func (*Server) Close

func (server *Server) Close()

Close destroys the server

func (*Server) Start

func (server *Server) Start()

Start starts the server.

func (*Server) Stop

func (server *Server) Stop()

Stop stops the server

func (*Server) Wait

func (server *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