Documentation ¶
Overview ¶
Package monitor defines monitors, where we send updates about tasks and performance
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor interface { // SendMetrics sends information about the current state of tasks to the monitor SendMetrics(tasks *demand.Tasks) (err error) }
Monitor defines the interface for monitors, which receive information about microscaling on a regular basis
type ServerMonitor ¶
type ServerMonitor struct {
// contains filtered or unexported fields
}
ServerMonitor receives metrics over the Microscaling API on the websocket
func NewServerMonitor ¶
func NewServerMonitor(ws *websocket.Conn, userID string) *ServerMonitor
NewServerMonitor returns a new monitor that uses the Microscaling API to send metrics about running tasks and demand
func (*ServerMonitor) SendMetrics ¶
func (m *ServerMonitor) SendMetrics(tasks *demand.Tasks) (err error)
SendMetrics uses the Microscaling API to send metrics about all the running tasks and demand
Click to show internal directories.
Click to hide internal directories.