Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerEngine ¶
type ServerEngine struct {
// contains filtered or unexported fields
}
ServerEngine retrieves demand from the server where it has been calculated
func NewEngine ¶
func NewEngine(ws *websocket.Conn) *ServerEngine
NewEngine initializes a new ServerEngine
func (*ServerEngine) GetDemand ¶
func (de *ServerEngine) GetDemand(tasks *demand.Tasks, demandUpdate chan struct{})
GetDemand collects the metrics, calculates demand, and sends demandUpdate messages on the API
func (*ServerEngine) StopDemand ¶
func (de *ServerEngine) StopDemand(demandUpdate chan struct{})
StopDemand should be called when we want to shut down. We signal the ServerEngine to close the websocket.
Click to show internal directories.
Click to hide internal directories.