package
module
Version:
v0.0.0-...-2a05fe4
Opens a new window with list of versions in this module.
Published: Mar 19, 2014
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
dashing-go
A Go port of shopify/dashing, built upon Martini.
Still under heavy construction!
Current Status
- The
/widget/:id
endpoint is done. You can now post JSON data to individual widgets.
- The
/events
endpoint (which emits Server-Sent Events) is done. Registered jobs can now transmit data to widget identifiers.
- For an example of how to write jobs in dashing-go, please refer to the demo dashboard.
Credits
Much of the code is referenced from golang-sse-todo by @rwynn.
Documentation
¶
Register a job to be kicked off upon starting the server.
Start all jobs and listen to requests.
A Broker broadcasts events to multiple clients.
NewBroker creates a Broker instance.
Start managing client connections and event broadcasts.
An Event contains the widget ID, a body of data,
and an optional target (only "dashboard" for now).
type Job interface {
Work(send chan *Event)
}
A Job does periodic work and sends events to a channel.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.