Documentation ¶
Index ¶
- func CamelCase(src string) string
- func Register(j Job)
- type Broker
- type Dashing
- type Event
- type Job
- type Server
- func (s *Server) DashboardEventHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) DashboardHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) EventsHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) NewRouter() http.Handler
- func (s *Server) StaticHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) WidgetEventHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) WidgetHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) WidgetsCSSHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) WidgetsJSHandler(w http.ResponseWriter, r *http.Request)
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
A Broker broadcasts events to multiple clients.
type Dashing ¶
type Dashing struct { Broker *Broker Worker *Worker Server *Server Router http.Handler // contains filtered or unexported fields }
Dashing struct definition.
func NewDashing ¶
NewDashing sets up the event broker, workers and webservice.
type Event ¶
An Event contains the widget ID, a body of data, and an optional target (only "dashboard" for now).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A Server contains webservice parameters and middlewares.
func (*Server) DashboardEventHandler ¶
func (s *Server) DashboardEventHandler(w http.ResponseWriter, r *http.Request)
DashboardEventHandler accepts dashboard events.
func (*Server) DashboardHandler ¶
func (s *Server) DashboardHandler(w http.ResponseWriter, r *http.Request)
DashboardHandler serves the dashboard layout template.
func (*Server) EventsHandler ¶
func (s *Server) EventsHandler(w http.ResponseWriter, r *http.Request)
EventsHandler opens a keepalive connection and pushes events to the client.
func (*Server) IndexHandler ¶
func (s *Server) IndexHandler(w http.ResponseWriter, r *http.Request)
IndexHandler redirects to the default dashboard.
func (*Server) StaticHandler ¶
func (s *Server) StaticHandler(w http.ResponseWriter, r *http.Request)
func (*Server) WidgetEventHandler ¶
func (s *Server) WidgetEventHandler(w http.ResponseWriter, r *http.Request)
WidgetEventHandler accepts widget data.
func (*Server) WidgetHandler ¶
func (s *Server) WidgetHandler(w http.ResponseWriter, r *http.Request)
WidgetHandler serves widget templates.
func (*Server) WidgetsCSSHandler ¶
func (s *Server) WidgetsCSSHandler(w http.ResponseWriter, r *http.Request)
func (*Server) WidgetsJSHandler ¶
func (s *Server) WidgetsJSHandler(w http.ResponseWriter, r *http.Request)
WidgetsJSHandler serves widget templates.
Click to show internal directories.
Click to hide internal directories.