Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handlers take a request string, handle the request, and generate some output to be sent back to the requestor.
type Request ¶
Stores the payload of a request, and provides the mechanism for sending the response output back to the requestor. Each request implementation is coupled with a particular Listener implementation.
type RequestListener ¶
type RequestListener interface {
Listen(incoming chan Request)
}
Listeners provide an interface for incoming requests to be submitted. The listener sends requests to the incoming channel.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
The Server is responsible for initializing a set of configured listeners which listen for incoming requests. Requests are routed to configured handlers based on the payload of the request.
func (*Server) AddHandler ¶
func (*Server) AddListener ¶
func (s *Server) AddListener(l RequestListener)
func (*Server) HandleRequest ¶
func (*Server) ListenAndServe ¶
Begin listening for and handling incoming requests.