* kill process tree using syscall on windows & cleanup (#80) * kill process tree using syscall on windows & cleanup * use job api * add error check for cmd.Start * modularize monitor, reduce init usage * replace slices with sort * update gopsutil & other dependencies
12 lines
182 B
Go
12 lines
182 B
Go
package load
|
|
|
|
import (
|
|
"context"
|
|
|
|
psLoad "github.com/shirou/gopsutil/v4/load"
|
|
)
|
|
|
|
func GetState(ctx context.Context) (*psLoad.AvgStat, error) {
|
|
return psLoad.AvgWithContext(ctx)
|
|
}
|