Documentation ¶
Index ¶
Constants ¶
View Source
const DevVersion = "0.0.0"
View Source
const SocketPath = "/tmp/robotui"
SocketPath is the unix domain socket path
Variables ¶
View Source
var ( // Version of executable Version = DevVersion // Commit of executable Commit = "" )
Functions ¶
func FormattedVersion ¶
func FormattedVersion() string
func HealthListener ¶
HealthListener attaches listener to unix domain socket and runs listener
Types ¶
type HTTPd ¶
HTTPd wraps an http.Server and adds the root router
func (*HTTPd) RegisterShutdownHandler ¶
func (s *HTTPd) RegisterShutdownHandler(callback func())
RegisterShutdownHandler connects the http handlers to the site
func (*HTTPd) RegisterSiteHandlers ¶
RegisterSiteHandlers connects the http handlers to the site
type Influx ¶
Influx is a influx publisher
func NewInfluxClient ¶
NewInfluxClient creates new publisher for influx
type InfluxConfig ¶
type InfluxConfig struct { URL string Database string Token string Org string User string Password string Interval time.Duration }
InfluxConfig is the influx db configuration
type SocketHub ¶
type SocketHub struct {
// contains filtered or unexported fields
}
SocketHub maintains the set of active clients and broadcasts messages to the clients.
func NewSocketHub ¶
func NewSocketHub() *SocketHub
NewSocketHub creates a web socket hub that distributes meter status and query results for the ui or other clients
func (*SocketHub) ServeWebsocket ¶
func (h *SocketHub) ServeWebsocket(w http.ResponseWriter, r *http.Request)
ServeWebsocket handles websocket requests from the peer.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.