v1.16.3
ADDED: * Much more functions to tplx/sprigx
This commit is contained in:
15
tplx/sprigx/funcs_tpl_psutils_linux.go
Normal file
15
tplx/sprigx/funcs_tpl_psutils_linux.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package sprigx
|
||||
|
||||
import (
|
||||
`context`
|
||||
|
||||
`github.com/shirou/gopsutil/v4/sensors`
|
||||
)
|
||||
|
||||
// psSensorExTemp wraps github.com/shirou/gopsutil/v4/sensors.NewExLinux().TemperatureWithContext() to not require a context.
|
||||
func psSensorExTemp() (exTemps []sensors.ExTemperature, err error) {
|
||||
|
||||
exTemps, err = sensors.NewExLinux().TemperatureWithContext(context.Background())
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user