db

package
v0.0.0-...-70b7d01 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Last

func Last(measurement Measurement) (*query.FluxRecord, error)

Last gets the latest point from the database

func LastFloat

func LastFloat(measurement Measurement) (float64, error)

LastFloat gets the latest point from the database as a float64

func LastOrNil

func LastOrNil(measurement Measurement) any

LastOrNil gets the latest point from the database, or nil if there is an error

func Write

func Write(measurement Measurement, tags map[string]string, fields map[string]any) error

Write a measurement to the database

Types

type Measurement

type Measurement string
var (
	HVSetpoint Measurement = "hv_setpoint"
	HVCurrent  Measurement = "hv_current"
	HVVoltage  Measurement = "hv_voltage"

	TurboRunning Measurement = "turbo_running"
	TurboSpeed   Measurement = "turbo_hz"
	TurboCurrent Measurement = "turbo_current"

	EdwardsGaugeTorr Measurement = "edwards_torr"
	EdwardsGaugeVolt Measurement = "edwards_volt"

	MKSGaugeVacuum Measurement = "mksgauge"

	NeutronCPS Measurement = "neutron_cps"

	MKSMFCFlow     Measurement = "mksmfc_flow"
	MKSMFCSetPoint Measurement = "mksmfc_setpoint"

	SierraMFCFlow     Measurement = "sierramfc_flow"
	SierraMFCSetPoint Measurement = "sierramfc_setpoint"
)

Jump to

Keyboard shortcuts

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