vendor: update elastic/gosigar so that it compiles on OpenBSD (#16542)

This commit is contained in:
Fabian Raetz
2018-04-21 19:19:12 +02:00
committed by Felix Lange
parent b15eb665ee
commit 744428cb03
12 changed files with 98 additions and 7 deletions

View File

@ -294,6 +294,10 @@ func (self *Swap) Get() error {
return nil
}
func (self *HugeTLBPages) Get() error {
return ErrNotImplemented{runtime.GOOS}
}
func (self *Cpu) Get() error {
load := [C.CPUSTATES]C.long{C.CP_USER, C.CP_NICE, C.CP_SYS, C.CP_INTR, C.CP_IDLE}
@ -381,6 +385,10 @@ func (self *ProcFDUsage) Get(pid int) error {
return ErrNotImplemented{runtime.GOOS}
}
func (self *Rusage) Get(pid int) error {
return ErrNotImplemented{runtime.GOOS}
}
func fillCpu(cpu *Cpu, load [C.CPUSTATES]C.long) {
cpu.User = uint64(load[0])
cpu.Nice = uint64(load[1])