telemetry

package
v0.0.0-...-3371691 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 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, greenShare float64)

UpdateChargeProgress uploads power and energy data every 30 seconds

func UpdateEnergy

func UpdateEnergy(chargeEnergy, greenEnergy float64)

UpdateEnergy accumulates the energy delta for later upload

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