telemetry

package
v0.0.0-...-e05b1bb Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(machineID string)

func Enable

func Enable(enable bool) error

func Enabled

func Enabled() bool

func Persist

func Persist(log *util.Logger)

Persist uploads the accumulated data if necessary

func UpdateChargeProgress

func UpdateChargeProgress(log *util.Logger, power, deltaCharged, greenShare float64)

UpdateChargeProgress accumulates the charge delta and uploads at given interval. This interval must be smaller that the apis expiry interval for treating power values as current.

Types

type ChargeProgress

type ChargeProgress struct {
	ChargePower  float64 `json:"chargePower"`
	GreenPower   float64 `json:"greenPower"`
	ChargeEnergy float64 `json:"chargeEnergy"`
	GreenEnergy  float64 `json:"greenEnergy"`
}

type InstanceChargeProgress

type InstanceChargeProgress struct {
	InstanceID string `json:"instanceId"`
	ChargeProgress
}

Jump to

Keyboard shortcuts

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