diff --git a/go.mod b/go.mod index 5c1f7441ef..3a0b0f5427 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( github.com/opencontainers/selinux v1.12.0 github.com/openshift/imagebuilder v1.2.16 github.com/rootless-containers/rootlesskit/v2 v2.3.5 - github.com/shirou/gopsutil/v4 v4.25.6 + github.com/shirou/gopsutil/v4 v4.25.7 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 @@ -167,8 +167,8 @@ require ( github.com/sylabs/sif/v2 v2.21.1 // indirect github.com/tchap/go-patricia/v2 v2.3.3 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.9.0 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect github.com/ulikunitz/xz v0.5.12 // indirect github.com/vbatts/tar-split v0.12.1 // indirect diff --git a/go.sum b/go.sum index 9571c94cc4..2dbca6184f 100644 --- a/go.sum +++ b/go.sum @@ -385,8 +385,8 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs= -github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c= +github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= +github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/sigstore/fulcio v1.6.6 h1:XaMYX6TNT+8n7Npe8D94nyZ7/ERjEsNGFC+REdi/wzw= github.com/sigstore/fulcio v1.6.6/go.mod h1:BhQ22lwaebDgIxVBEYOOqLRcN5+xOV+C9bh/GUXRhOk= github.com/sigstore/protobuf-specs v0.4.1 h1:5SsMqZbdkcO/DNHudaxuCUEjj6x29tS2Xby1BxGU7Zc= @@ -424,10 +424,10 @@ github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhg github.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= -github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= -github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= -github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= -github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/u-root/gobusybox/src v0.0.0-20231228173702-b69f654846aa h1:unMPGGK/CRzfg923allsikmvk2l7beBeFPUNC4RVX/8= github.com/u-root/gobusybox/src v0.0.0-20231228173702-b69f654846aa/go.mod h1:Zj4Tt22fJVn/nz/y6Ergm1SahR9dio1Zm/D2/S0TmXM= github.com/u-root/u-root v0.12.1-0.20240114161452-ab3534910ced h1:G0F7Hmwph1OjozbAUBLKJ94CmY1OlH1cGMydXgB24j0= diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go index a1dc14d21a..9e23edb6ea 100644 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go @@ -36,7 +36,8 @@ func Times(percpu bool) ([]TimesStat, error) { return TimesWithContext(context.Background(), percpu) } -func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err error) { +func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { + ret := make([]TimesStat, 0) if !percpu { mib := []int32{ctlKern, kernCpTime} buf, _, err := common.CallSyscall(mib) @@ -44,15 +45,15 @@ func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err erro return ret, err } times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - stat := TimesStat{ + ret = append(ret, TimesStat{ CPU: "cpu-total", User: float64(times.User), Nice: float64(times.Nice), System: float64(times.Sys), Idle: float64(times.Idle), Irq: float64(times.Intr), - } - return []TimesStat{stat}, nil + }) + return ret, nil } ncpu, err := unix.SysctlUint32("hw.ncpu") diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go index 4ab02d03b8..9b37d296a8 100644 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go @@ -54,7 +54,8 @@ func Times(percpu bool) ([]TimesStat, error) { return TimesWithContext(context.Background(), percpu) } -func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err error) { +func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { + ret := make([]TimesStat, 0) if !percpu { mib := []int32{ctlKern, kernCpTime} buf, _, err := common.CallSyscall(mib) @@ -62,15 +63,15 @@ func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err erro return ret, err } times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - stat := TimesStat{ + ret = append(ret, TimesStat{ CPU: "cpu-total", User: float64(times.User) / ClocksPerSec, Nice: float64(times.Nice) / ClocksPerSec, System: float64(times.Sys) / ClocksPerSec, Idle: float64(times.Idle) / ClocksPerSec, Irq: float64(times.Intr) / ClocksPerSec, - } - return []TimesStat{stat}, nil + }) + return ret, nil } ncpu, err := unix.SysctlUint32("hw.ncpu") diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go index 3f4416bfd7..12bf36aa92 100644 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go +++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go @@ -270,12 +270,12 @@ func CountsWithContext(_ context.Context, logical bool) (int, error) { return int(ret), nil } - var systemInfo systemInfo - _, _, err := procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&systemInfo))) - if systemInfo.dwNumberOfProcessors == 0 { + var sInfo systemInfo + _, _, err := procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sInfo))) + if sInfo.dwNumberOfProcessors == 0 { return 0, err } - return int(systemInfo.dwNumberOfProcessors), nil + return int(sInfo.dwNumberOfProcessors), nil } // Get physical core count https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L499 diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go index 11a4fd410f..da7eb6385e 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go @@ -472,7 +472,7 @@ func (d *decoder) value(v reflect.Value) { // but creating the StructField info for each field is // costly (run "go test -bench=ReadStruct" and compare // results when making changes to this code). - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { + if v = v.Field(i); v.CanSet() || t.Field(i).Name != "_" { d.value(v) } else { d.skip(v) @@ -534,7 +534,7 @@ func (e *encoder) value(v reflect.Value) { l := v.NumField() for i := 0; i < l; i++ { // see comment for corresponding code in decoder.value() - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { + if v = v.Field(i); v.CanSet() || t.Field(i).Name != "_" { e.value(v) } else { e.skip(v) diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go index d48b41e511..0e766b7b01 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go @@ -49,7 +49,7 @@ func (i Invoke) Command(name string, arg ...string) ([]byte, error) { return i.CommandWithContext(ctx, name, arg...) } -func (i Invoke) CommandWithContext(ctx context.Context, name string, arg ...string) ([]byte, error) { +func (Invoke) CommandWithContext(ctx context.Context, name string, arg ...string) ([]byte, error) { cmd := exec.CommandContext(ctx, name, arg...) var buf bytes.Buffer diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go index ffaae423b3..1ec223150b 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go @@ -119,18 +119,18 @@ func BootTimeWithContext(ctx context.Context, enableCache bool) (uint64, error) } func handleBootTimeFileReadErr(err error) (uint64, error) { - if os.IsPermission(err) { - var info syscall.Sysinfo_t - err := syscall.Sysinfo(&info) - if err != nil { - return 0, err - } - - currentTime := time.Now().UnixNano() / int64(time.Second) - t := currentTime - int64(info.Uptime) - return uint64(t), nil + if !os.IsPermission(err) { + return 0, err } - return 0, err + var info syscall.Sysinfo_t + err = syscall.Sysinfo(&info) + if err != nil { + return 0, err + } + + currentTime := time.Now().UnixNano() / int64(time.Second) + t := currentTime - int64(info.Uptime) + return uint64(t), nil } func readBootTimeStat(ctx context.Context) (uint64, error) { diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go b/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go index 0a12fe2fe3..659b65575b 100644 --- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go @@ -31,7 +31,7 @@ func (ex *ExLinux) VirtualMemory() (*ExVirtualMemory, error) { return ex.VirtualMemoryWithContext(context.Background()) } -func (ex *ExLinux) VirtualMemoryWithContext(ctx context.Context) (*ExVirtualMemory, error) { +func (*ExLinux) VirtualMemoryWithContext(ctx context.Context) (*ExVirtualMemory, error) { _, vmEx, err := fillFromMeminfoWithContext(ctx) if err != nil { return nil, err diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go index c1a9ed12da..907143d3ed 100644 --- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go +++ b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go @@ -27,7 +27,7 @@ func NewExWindows() *ExWindows { return &ExWindows{} } -func (e *ExWindows) VirtualMemory() (*ExVirtualMemory, error) { +func (*ExWindows) VirtualMemory() (*ExVirtualMemory, error) { var memInfo memoryStatusEx memInfo.cbSize = uint32(unsafe.Sizeof(memInfo)) // If mem == 0 since this is an error according to GlobalMemoryStatusEx documentation diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem.go index 0da71a9886..01932ddfda 100644 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem.go +++ b/vendor/github.com/shirou/gopsutil/v4/mem/mem.go @@ -48,7 +48,7 @@ type VirtualMemoryStat struct { Laundry uint64 `json:"laundry"` // Linux specific numbers - // https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-proc-meminfo.html + // https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-meminfo // https://www.kernel.org/doc/Documentation/filesystems/proc.txt // https://www.kernel.org/doc/Documentation/vm/overcommit-accounting // https://www.kernel.org/doc/Documentation/vm/transhuge.txt diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go index d5a93f41f8..4531dd4449 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go @@ -81,36 +81,36 @@ func parseNetstatNetLine(line string) (ConnectionStat, error) { var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`) +func parseAddr(l string, family uint32) (Addr, error) { + matches := portMatch.FindStringSubmatch(l) + if matches == nil { + return Addr{}, fmt.Errorf("wrong addr, %s", l) + } + host := matches[1] + port := matches[2] + if host == "*" { + switch family { + case syscall.AF_INET: + host = "0.0.0.0" + case syscall.AF_INET6: + host = "::" + default: + return Addr{}, fmt.Errorf("unknown family, %d", family) + } + } + lport, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return Addr{}, err + } + return Addr{IP: host, Port: uint32(lport)}, nil +} + // This function only works for netstat returning addresses with a "." // before the port (0.0.0.0.22 instead of 0.0.0.0:22). func parseNetstatAddr(local, remote string, family uint32) (laddr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - matches := portMatch.FindStringSubmatch(l) - if matches == nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - host := matches[1] - port := matches[2] - if host == "*" { - switch family { - case syscall.AF_INET: - host = "0.0.0.0" - case syscall.AF_INET6: - host = "::" - default: - return Addr{}, fmt.Errorf("unknown family, %d", family) - } - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil - } - - laddr, err = parse(local) + laddr, err = parseAddr(local, family) if remote != "*.*" { // remote addr exists - raddr, err = parse(remote) + raddr, err = parseAddr(remote, family) if err != nil { return laddr, raddr, err } diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go index 55087ce37d..ec4cfb957f 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go @@ -217,34 +217,34 @@ func parseNetstatLine(line string) (ConnectionStat, error) { return n, nil } -func parseNetstatAddr(local, remote string, family uint32) (laddr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - matches := portMatch.FindStringSubmatch(l) - if matches == nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - host := matches[1] - port := matches[2] - if host == "*" { - switch family { - case syscall.AF_INET: - host = "0.0.0.0" - case syscall.AF_INET6: - host = "::" - default: - return Addr{}, fmt.Errorf("unknown family, %d", family) - } - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil +func parseAddr(l string, family uint32) (Addr, error) { + matches := portMatch.FindStringSubmatch(l) + if matches == nil { + return Addr{}, fmt.Errorf("wrong addr, %s", l) } + host := matches[1] + port := matches[2] + if host == "*" { + switch family { + case syscall.AF_INET: + host = "0.0.0.0" + case syscall.AF_INET6: + host = "::" + default: + return Addr{}, fmt.Errorf("unknown family, %d", family) + } + } + lport, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return Addr{}, err + } + return Addr{IP: host, Port: uint32(lport)}, nil +} - laddr, err = parse(local) +func parseNetstatAddr(local, remote string, family uint32) (laddr, raddr Addr, err error) { + laddr, err = parseAddr(local, family) if remote != "*.*" { // remote addr exists - raddr, err = parse(remote) + raddr, err = parseAddr(remote, family) if err != nil { return laddr, raddr, err } diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go index 7c5153d308..c491a29113 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go @@ -131,26 +131,26 @@ func parseNetLine(line string) (ConnectionStat, error) { return n, nil } -func parseNetAddr(line string) (laddr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - host, port, err := net.SplitHostPort(l) - if err != nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil +func parseAddr(l string) (Addr, error) { + host, port, err := net.SplitHostPort(l) + if err != nil { + return Addr{}, fmt.Errorf("wrong addr, %s", l) } + lport, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return Addr{}, err + } + return Addr{IP: host, Port: uint32(lport)}, nil +} +func parseNetAddr(line string) (laddr, raddr Addr, err error) { addrs := strings.Split(line, "->") if len(addrs) == 0 { return laddr, raddr, fmt.Errorf("wrong netaddr, %s", line) } - laddr, err = parse(addrs[0]) + laddr, err = parseAddr(addrs[0]) if len(addrs) == 2 { // remote addr exists - raddr, err = parse(addrs[1]) + raddr, err = parseAddr(addrs[1]) if err != nil { return laddr, raddr, err } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go index 1a58c3eca3..d96af8dc41 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go @@ -16,55 +16,55 @@ type MemoryInfoExStat struct{} type MemoryMapsStat struct{} -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { +func (*Process) TgidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { +func (*Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { +func (*Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { +func (*Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { +func (*Process) NumFDsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { +func (*Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { +func (*Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { +func (*Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { +func (*Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { +func (*Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { +func (*Process) EnvironWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go index 91f3932033..2c14a8f503 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go @@ -138,7 +138,7 @@ func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { return gids, nil } -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GroupsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError // k, err := p.getKProc() // if err != nil { @@ -153,7 +153,7 @@ func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { // return groups, nil } -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { +func (*Process) TerminalWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError /* k, err := p.getKProc() @@ -179,7 +179,7 @@ func (p *Process) NiceWithContext(_ context.Context) (int32, error) { return int32(k.Proc.P_nice), nil } -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { +func (*Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go b/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go index b014297348..699311a9ca 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go @@ -42,162 +42,162 @@ func PidExistsWithContext(_ context.Context, _ int32) (bool, error) { return false, common.ErrNotImplementedError } -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { +func (*Process) PpidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) NameWithContext(_ context.Context) (string, error) { +func (*Process) NameWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { +func (*Process) TgidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) ExeWithContext(_ context.Context) (string, error) { +func (*Process) ExeWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { +func (*Process) CmdlineWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { +func (*Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { +func (*Process) createTimeWithContext(_ context.Context) (int64, error) { return 0, common.ErrNotImplementedError } -func (p *Process) CwdWithContext(_ context.Context) (string, error) { +func (*Process) CwdWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { +func (*Process) StatusWithContext(_ context.Context) ([]string, error) { return []string{""}, common.ErrNotImplementedError } -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { +func (*Process) ForegroundWithContext(_ context.Context) (bool, error) { return false, common.ErrNotImplementedError } -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) UidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GroupsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { +func (*Process) TerminalWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { +func (*Process) NiceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { +func (*Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { +func (*Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { +func (*Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { +func (*Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { +func (*Process) NumFDsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { +func (*Process) NumThreadsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { +func (*Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { +func (*Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { +func (*Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { +func (*Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { +func (*Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { +func (*Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { return nil, common.ErrNotImplementedError } -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { +func (*Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { +func (*Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) SendSignalWithContext(_ context.Context, _ Signal) error { +func (*Process) SendSignalWithContext(_ context.Context, _ Signal) error { return common.ErrNotImplementedError } -func (p *Process) SuspendWithContext(_ context.Context) error { +func (*Process) SuspendWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) ResumeWithContext(_ context.Context) error { +func (*Process) ResumeWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) TerminateWithContext(_ context.Context) error { +func (*Process) TerminateWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) KillWithContext(_ context.Context) error { +func (*Process) KillWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) UsernameWithContext(_ context.Context) (string, error) { +func (*Process) UsernameWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { +func (*Process) EnvironWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go b/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go index f44f6bc6f7..a6279d1228 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go @@ -194,7 +194,7 @@ func (p *Process) NiceWithContext(ctx context.Context) (int32, error) { return nice, nil } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } @@ -310,7 +310,7 @@ func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) return cpuTimes, nil } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } @@ -880,7 +880,7 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { case "Uid": p.uids = make([]uint32, 0, 4) for _, i := range strings.Split(value, "\t") { - v, err := strconv.ParseInt(i, 10, 32) + v, err := strconv.ParseUint(i, 10, 32) if err != nil { return err } @@ -889,7 +889,7 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { case "Gid": p.gids = make([]uint32, 0, 4) for _, i := range strings.Split(value, "\t") { - v, err := strconv.ParseInt(i, 10, 32) + v, err := strconv.ParseUint(i, 10, 32) if err != nil { return err } @@ -924,49 +924,49 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { } p.numCtxSwitches.Involuntary = v case "VmRSS": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.RSS = v * 1024 case "VmSize": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.VMS = v * 1024 case "VmSwap": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.Swap = v * 1024 case "VmHWM": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.HWM = v * 1024 case "VmData": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.Data = v * 1024 case "VmStk": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } p.memInfo.Stack = v * 1024 case "VmLck": - value := strings.Trim(value, " kB") // remove last "kB" + value = strings.Trim(value, " kB") // remove last "kB" v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go index 063ff20ca2..11bc5c18d2 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go @@ -78,7 +78,7 @@ func (p *Process) CwdWithContext(_ context.Context) (string, error) { return common.ByteToString(buf), nil } -func (p *Process) ExeWithContext(_ context.Context) (string, error) { +func (*Process) ExeWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } @@ -142,7 +142,7 @@ func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) { return strings.Join(argv, " "), nil } -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { +func (*Process) createTimeWithContext(_ context.Context) (int64, error) { return 0, common.ErrNotImplementedError } @@ -252,7 +252,7 @@ func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, err }, nil } -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { +func (*Process) NumThreadsWithContext(_ context.Context) (int32, error) { /* not supported, just return 1 */ return 1, nil } @@ -305,11 +305,11 @@ func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { return ret, nil } -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go b/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go index 7f68771823..bdb07ff285 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go @@ -42,162 +42,162 @@ func PidExistsWithContext(_ context.Context, _ int32) (bool, error) { return false, common.ErrNotImplementedError } -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { +func (*Process) PpidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) NameWithContext(_ context.Context) (string, error) { +func (*Process) NameWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { +func (*Process) TgidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) ExeWithContext(_ context.Context) (string, error) { +func (*Process) ExeWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { +func (*Process) CmdlineWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { +func (*Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { +func (*Process) createTimeWithContext(_ context.Context) (int64, error) { return 0, common.ErrNotImplementedError } -func (p *Process) CwdWithContext(_ context.Context) (string, error) { +func (*Process) CwdWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { +func (*Process) StatusWithContext(_ context.Context) ([]string, error) { return []string{""}, common.ErrNotImplementedError } -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { +func (*Process) ForegroundWithContext(_ context.Context) (bool, error) { return false, common.ErrNotImplementedError } -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) UidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GroupsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { +func (*Process) TerminalWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { +func (*Process) NiceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { +func (*Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { +func (*Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { +func (*Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { +func (*Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { +func (*Process) NumFDsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { +func (*Process) NumThreadsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { +func (*Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { +func (*Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { +func (*Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { +func (*Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { +func (*Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { +func (*Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { return nil, common.ErrNotImplementedError } -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { +func (*Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { +func (*Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) SendSignalWithContext(_ context.Context, _ Signal) error { +func (*Process) SendSignalWithContext(_ context.Context, _ Signal) error { return common.ErrNotImplementedError } -func (p *Process) SuspendWithContext(_ context.Context) error { +func (*Process) SuspendWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) ResumeWithContext(_ context.Context) error { +func (*Process) ResumeWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) TerminateWithContext(_ context.Context) error { +func (*Process) TerminateWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) KillWithContext(_ context.Context) error { +func (*Process) KillWithContext(_ context.Context) error { return common.ErrNotImplementedError } -func (p *Process) UsernameWithContext(_ context.Context) (string, error) { +func (*Process) UsernameWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { +func (*Process) EnvironWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go b/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go index 6af5633e06..685a3cc32d 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go @@ -52,15 +52,15 @@ func ProcessesWithContext(ctx context.Context) ([]*Process, error) { return out, nil } -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { +func (*Process) PpidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) NameWithContext(_ context.Context) (string, error) { +func (*Process) NameWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { +func (*Process) TgidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } @@ -80,7 +80,7 @@ func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) return p.fillSliceFromCmdlineWithContext(ctx) } -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { +func (*Process) createTimeWithContext(_ context.Context) (int64, error) { return 0, common.ErrNotImplementedError } @@ -88,51 +88,51 @@ func (p *Process) CwdWithContext(ctx context.Context) (string, error) { return p.fillFromPathCwdWithContext(ctx) } -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { +func (*Process) StatusWithContext(_ context.Context) ([]string, error) { return []string{""}, common.ErrNotImplementedError } -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { +func (*Process) ForegroundWithContext(_ context.Context) (bool, error) { return false, common.ErrNotImplementedError } -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) UidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GroupsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { +func (*Process) TerminalWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { +func (*Process) NiceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { +func (*Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { +func (*Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { +func (*Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { +func (*Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { return nil, common.ErrNotImplementedError } @@ -141,55 +141,55 @@ func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) { return int32(len(fnames)), err } -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { +func (*Process) NumThreadsWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { +func (*Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { +func (*Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { +func (*Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { +func (*Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { +func (*Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { +func (*Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { return nil, common.ErrNotImplementedError } -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { +func (*Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { +func (*Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { +func (*Process) EnvironWithContext(_ context.Context) ([]string, error) { return nil, common.ErrNotImplementedError } diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go index b4748d38e7..16580e1b72 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go @@ -202,10 +202,10 @@ type ( ) func init() { - var systemInfo systemInfo + var sInfo systemInfo - procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&systemInfo))) - processorArchitecture = uint(systemInfo.wProcessorArchitecture) + procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sInfo))) + processorArchitecture = uint(sInfo.wProcessorArchitecture) // enable SeDebugPrivilege https://github.com/midstar/proci/blob/6ec79f57b90ba3d9efa2a7b16ef9c9369d4be875/proci_windows.go#L80-L119 handle, err := syscall.GetCurrentProcess() @@ -336,7 +336,7 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) { return filepath.Base(exe), nil } -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { +func (*Process) TgidWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } @@ -456,11 +456,11 @@ func (p *Process) CwdWithContext(_ context.Context) (string, error) { return "", nil } -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { +func (*Process) StatusWithContext(_ context.Context) ([]string, error) { return []string{""}, common.ErrNotImplementedError } -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { +func (*Process) ForegroundWithContext(_ context.Context) (bool, error) { return false, common.ErrNotImplementedError } @@ -487,19 +487,19 @@ func (p *Process) UsernameWithContext(_ context.Context) (string, error) { return domain + "\\" + user, err } -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) UidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GidsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { +func (*Process) GroupsWithContext(_ context.Context) ([]uint32, error) { return nil, common.ErrNotImplementedError } -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { +func (*Process) TerminalWithContext(_ context.Context) (string, error) { return "", common.ErrNotImplementedError } @@ -532,15 +532,15 @@ func (p *Process) NiceWithContext(_ context.Context) (int32, error) { return priority, nil } -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { +func (*Process) IOniceWithContext(_ context.Context) (int32, error) { return 0, common.ErrNotImplementedError } -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { +func (*Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { +func (*Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { return nil, common.ErrNotImplementedError } @@ -550,22 +550,22 @@ func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, err return nil, err } defer windows.CloseHandle(c) - var ioCounters ioCounters - ret, _, err := procGetProcessIoCounters.Call(uintptr(c), uintptr(unsafe.Pointer(&ioCounters))) + var counters ioCounters + ret, _, err := procGetProcessIoCounters.Call(uintptr(c), uintptr(unsafe.Pointer(&counters))) if ret == 0 { return nil, err } stats := &IOCountersStat{ - ReadCount: ioCounters.ReadOperationCount, - ReadBytes: ioCounters.ReadTransferCount, - WriteCount: ioCounters.WriteOperationCount, - WriteBytes: ioCounters.WriteTransferCount, + ReadCount: counters.ReadOperationCount, + ReadBytes: counters.ReadTransferCount, + WriteCount: counters.WriteOperationCount, + WriteBytes: counters.WriteTransferCount, } return stats, nil } -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { +func (*Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { return nil, common.ErrNotImplementedError } @@ -601,7 +601,7 @@ func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { return ret, nil } -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { +func (*Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { return nil, common.ErrNotImplementedError } @@ -629,7 +629,7 @@ func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { }, nil } -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { +func (*Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { return nil, common.ErrNotImplementedError } @@ -647,7 +647,7 @@ func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, err return ret, nil } -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { +func (*Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { return nil, common.ErrNotImplementedError } @@ -788,15 +788,15 @@ func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionS return net.ConnectionsPidWithContext(ctx, "all", p.Pid) } -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { +func (*Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { +func (*Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { return nil, common.ErrNotImplementedError } -func (p *Process) SendSignalWithContext(_ context.Context, _ syscall.Signal) error { +func (*Process) SendSignalWithContext(_ context.Context, _ syscall.Signal) error { return common.ErrNotImplementedError } diff --git a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml index 33e6595cca..495e5e633d 100644 --- a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml +++ b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml @@ -1,10 +1,10 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.22.2 + GO_VERSION: go1.24.0 freebsd_13_task: freebsd_instance: - image_family: freebsd-13-2 + image_family: freebsd-13-5 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest @@ -14,7 +14,7 @@ freebsd_13_task: freebsd_14_task: freebsd_instance: - image_family: freebsd-14-0 + image_family: freebsd-14-2 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml index b3091efdef..495e5e633d 100644 --- a/vendor/github.com/tklauser/numcpus/.cirrus.yml +++ b/vendor/github.com/tklauser/numcpus/.cirrus.yml @@ -1,10 +1,10 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.23.0 + GO_VERSION: go1.24.0 freebsd_13_task: freebsd_instance: - image_family: freebsd-13-3 + image_family: freebsd-13-5 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest @@ -14,7 +14,7 @@ freebsd_13_task: freebsd_14_task: freebsd_instance: - image_family: freebsd-14-0 + image_family: freebsd-14-2 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest diff --git a/vendor/modules.txt b/vendor/modules.txt index 5f01898400..48a7ce149f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -830,8 +830,8 @@ github.com/secure-systems-lab/go-securesystemslib/encrypted # github.com/segmentio/ksuid v1.0.4 ## explicit; go 1.12 github.com/segmentio/ksuid -# github.com/shirou/gopsutil/v4 v4.25.6 -## explicit; go 1.23 +# github.com/shirou/gopsutil/v4 v4.25.7 +## explicit; go 1.23.0 github.com/shirou/gopsutil/v4/common github.com/shirou/gopsutil/v4/cpu github.com/shirou/gopsutil/v4/internal/common @@ -890,11 +890,11 @@ github.com/tchap/go-patricia/v2/patricia # github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 ## explicit github.com/titanous/rocacheck -# github.com/tklauser/go-sysconf v0.3.14 -## explicit; go 1.18 +# github.com/tklauser/go-sysconf v0.3.15 +## explicit; go 1.23.0 github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.9.0 -## explicit; go 1.18 +# github.com/tklauser/numcpus v0.10.0 +## explicit; go 1.23.0 github.com/tklauser/numcpus # github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 ## explicit; go 1.21