Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EnableLongPolling controls if long polling is used. If false than clients // will be given an immediate empty repsonse if no messages are waiting for // them. If true the connection will be held until a message comes in or until // it timesout. EnableLongPolling = true // ThrottleDelay will delay messages from being pushed to clients. This will // artificially throttle the connect and reconnects from the clients. ThrottleDelay = 500 * time.Millisecond )
Functions ¶
Types ¶
type EndPointHandler ¶
type EndPointHandler struct {
// contains filtered or unexported fields
}
EndPointHandler is a collection of API endpoints.
func (*EndPointHandler) Add ¶
func (h *EndPointHandler) Add(method string, pattern string, handler func(http.ResponseWriter, *http.Request))
Add will add an endpoint to the handler.
func (*EndPointHandler) ServeHTTP ¶
func (h *EndPointHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP matches the request to the appropriate route and calls its handler.
Click to show internal directories.
Click to hide internal directories.