serverEngine

package
Version: v0.0.0-...-33bb219 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL