Documentation ¶
Index ¶
Constants ¶
View Source
const ( Namespace = `ROOT\LibreHardwareMonitor` QuerySensor = `SELECT * FROM Sensor` QueryHardware = `SELECT * FROM Hardware` )
Variables ¶
View Source
var DefaultWMIQueryNamespace = wmi.QueryNamespace
Functions ¶
This section is empty.
Types ¶
type Hardware ¶
type Hardware struct { Name string `json:"name"` HardwareType string `json:"hardware_type"` Identifier string `json:"identifier"` }
func GetHardwares ¶
func GetHardwares(queryNamespace QueryNamespaceFn) (hardwares []Hardware, err error)
GetHardwares accept QueryNamespaceFn so it would be easier to test
type Logger ¶
type Logger interface { Print(args ...interface{}) Println(args ...interface{}) Printf(format string, args ...interface{}) Debug(args ...interface{}) Debugln(args ...interface{}) Debugf(format string, args ...interface{}) Trace(args ...interface{}) Traceln(args ...interface{}) Tracef(format string, args ...interface{}) Info(args ...interface{}) Infoln(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnln(args ...interface{}) Warnf(format string, args ...interface{}) Warning(args ...interface{}) Warningln(args ...interface{}) Warningf(format string, args ...interface{}) Error(args ...interface{}) Errorln(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalln(args ...interface{}) Fatalf(format string, args ...interface{}) }
type QueryNamespaceFn ¶
type Sensor ¶
type Sensor struct { Name string `json:"name"` SensorType string `json:"sensor_type"` Identifier string `json:"identifier"` Value float32 `json:"value"` Max float32 `json:"max"` Min float32 `json:"min"` }
func GetSensors ¶
func GetSensors(queryNamespace QueryNamespaceFn) (sensors []Sensor, err error)
GetSensors accept QueryNamespaceFn so it would be easier to test
Click to show internal directories.
Click to hide internal directories.