Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type Resolution struct {
HostParentProcessID int `json:"hostParentProcessId"`
ProcessName string `json:"processName"`
ProcessPath string `json:"processPath"`
CpuUsage int `json:"cpuUsage"`
MemoryUsage int `json:"memoryUsage"`
ResolutionMechanism ResolutionMechanism `json:"resolutionMechanism"`
sync.Mutex
}
Expand Down Expand Up @@ -281,6 +283,20 @@ func (resolution *Resolution) SetProcessPath(ProcessPath string) *Resolution {
return resolution
}

func (resolution *Resolution) SetCpuUsage(CpuUsage int) *Resolution {
resolution.Lock()
defer resolution.Unlock()
resolution.CpuUsage = CpuUsage
return resolution
}

func (resolution *Resolution) SetMemoryUsage(MemoryUsage int) *Resolution {
resolution.Lock()
defer resolution.Unlock()
resolution.MemoryUsage = MemoryUsage
return resolution
}

func (resolution *Resolution) SetResolutionMechanism(ResolutionMechanism ResolutionMechanism) *Resolution {
resolution.Lock()
defer resolution.Unlock()
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubeshark/api2 v0.0.0-20250613175225-65be260e56f6 h1:yDx1eb+qQ3hB3xHQzSP7MLTDAFW9/jWuKGUA1GpFG7U=
github.com/kubeshark/api2 v0.0.0-20250613175225-65be260e56f6/go.mod h1:naOqOy71RRXeKPVH7/Vr2cGbyRDLg9sPKDBeOxdNCWU=
github.com/kubeshark/api2 v0.0.0-20250616171331-0bb2df0d448a h1:+0APmVFqmmpibP2oluAdyqnD05z17iq+sSQvSXj2w2A=
github.com/kubeshark/api2 v0.0.0-20250616171331-0bb2df0d448a/go.mod h1:naOqOy71RRXeKPVH7/Vr2cGbyRDLg9sPKDBeOxdNCWU=
github.com/kubeshark/gopacket v1.1.30 h1:Dz6eo7b6+NdVCrgiyKxlGEVTm0L6PwgbVvSomsuwIyU=
Expand Down