Documentation ¶
Index ¶
- type HandlerPicker
- type Server
- func (s *Server) Handle(pattern string, handler http.Handler)
- func (s *Server) HandleFunc(pattern string, fn func(http.ResponseWriter, *http.Request))
- func (s *Server) Listen(addr string) error
- func (s *Server) ListenURL() string
- func (s *Server) RegisterPreMux(hp HandlerPicker)
- func (s *Server) Serve()
- func (s *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (s *Server) SetTLS(certFile, keyFile string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerPicker ¶
type HandlerPicker func(req *http.Request) (http.HandlerFunc, bool)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleFunc ¶
func (*Server) RegisterPreMux ¶
func (s *Server) RegisterPreMux(hp HandlerPicker)
Register conditional handler-picker functions which get run before HandleFunc or Handle. The HandlerPicker should return false if it's not interested in a request.
Click to show internal directories.
Click to hide internal directories.