Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHeaderRewriter ¶
func NewHeaderRewriter(trustedIPs []string, insecure bool) (forward.ReqRewriter, error)
NewHeaderRewriter Create a header rewriter
Types ¶
type RecordingErrorHandler ¶
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 ¶
func NewRecordingErrorHandler(recorder middlewares.NetErrorRecorder) *RecordingErrorHandler
NewRecordingErrorHandler creates and returns a new instance of RecordingErrorHandler.
func (*RecordingErrorHandler) ServeHTTP ¶
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 ¶
func (s *Server) AddListener(listener func(types.Configuration))
AddListener adds a new listener function used when new configuration is provided
func (*Server) StartWithContext ¶
StartWithContext starts the server and Stop/Close it when context is Done
Source Files ¶
Click to show internal directories.
Click to hide internal directories.