monitor

package
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: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL