Discover Packages
github.com/maldn/dashing-go
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 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
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.
Expand ▾
Collapse ▴
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.