Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
// Name returns the name of this handler and the appropriate path
Name() string
// Enabled checks if this handler is a no-op
Enabled() bool
// Connect connects this handler
// which may be a no-op if no settings were provided
Connect() (err error)
// ServeHTTP handles a given request
ServeHTTP(w http.ResponseWriter, r *http.Request) (code int, res interface{}, err error)
}
Handler is a handler using an engine
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a server capable of answering requests to multiple engines
func (*Server) AddHandler ¶
AddHandler adds a handler to the server
func (*Server) ListenAndServe ¶
ListenAndServe starts serving requests on the given port
func (*Server) Status ¶
func (server *Server) Status() *StatusResponse
Status returns the current status
Click to show internal directories.
Click to hide internal directories.