Documentation ¶
Index ¶
- Constants
- func GetVisitorAddress(r *http.Request) string
- func InjectHeartbeat(r *http.Request, m Messenger)
- func Mux(webDir string, broker *eventbroker.Broker, counter *metrics.Counter) *http.ServeMux
- type IndexHandler
- type MessageHandler
- type Messenger
- type Metrics
- type MetricsHandler
- type NotificationHandler
- type Payload
Constants ¶
View Source
const ( MessageTypeDefault = "message" MessageTypeHeartbeat = "heartbeat" MessageTypeService = "service" )
Variables ¶
This section is empty.
Functions ¶
func GetVisitorAddress ¶
func InjectHeartbeat ¶
Types ¶
type IndexHandler ¶
type IndexHandler struct{}
func (IndexHandler) ServeHTTP ¶
func (i IndexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MessageHandler ¶
type MessageHandler struct {
Broker *eventbroker.Broker
}
func (MessageHandler) ServeHTTP ¶
func (m MessageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MetricsHandler ¶
func (*MetricsHandler) ServeHTTP ¶
func (m *MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type NotificationHandler ¶
type NotificationHandler struct { Broker *eventbroker.Broker Counter *metrics.Counter }
func (*NotificationHandler) ServeHTTP ¶
func (n *NotificationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.