sensors

package
v12.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sensors provide methods for collecting sensors information

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Name         string
	TempSensors  []*TempSensor
	PowerSensors []*PowerSensor
}

Device contains info from different device sensors

func Collect

func Collect() ([]*Device, error)

Collect collects sensors information

func (*Device) Temperature

func (d *Device) Temperature() (float64, float64, float64)

Temperature returns min, max and average temperature

type PowerSensor

type PowerSensor struct {
	Name string
	Cur  float64
	Min  float64
	Max  float64
}

PowerSensor contains info from power sensor

type TempSensor

type TempSensor struct {
	Name string
	Cur  float64
	Min  float64
	Mid  float64
	Max  float64
	Crit float64
}

TempSensor contains info from temperature sensor

func (*TempSensor) String

func (s *TempSensor) String() string

String formats sensor data as a string

Jump to

Keyboard shortcuts

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