Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPHandlerSwitcher ¶
type HTTPHandlerSwitcher struct {
// contains filtered or unexported fields
}
HTTPHandlerSwitcher allows hot switching of http.ServeMux
func NewHandlerSwitcher ¶
func NewHandlerSwitcher(newHandler http.Handler) (hs *HTTPHandlerSwitcher)
NewHandlerSwitcher builds a new instance of HTTPHandlerSwitcher
func (*HTTPHandlerSwitcher) GetHandler ¶
func (h *HTTPHandlerSwitcher) GetHandler() (newHandler http.Handler)
GetHandler returns the current http.ServeMux
func (*HTTPHandlerSwitcher) ServeHTTP ¶
func (h *HTTPHandlerSwitcher) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*HTTPHandlerSwitcher) UpdateHandler ¶
func (h *HTTPHandlerSwitcher) UpdateHandler(newHandler http.Handler)
UpdateHandler safely updates the current http.ServeMux with a new one
type Stateful ¶
type Stateful interface { http.ResponseWriter http.Hijacker http.Flusher http.CloseNotifier }
Stateful interface groups all http interfaces that must be implemented by a stateful middleware (ie: recorders)
Directories ¶
Path | Synopsis |
---|---|
Package headers Middleware based on https://github.com/unrolled/secure.
|
Package headers Middleware based on https://github.com/unrolled/secure. |
Click to show internal directories.
Click to hide internal directories.