Skip to content

Commit f1b31e3

Browse files
committed
Compatibility with breaking changes I just made to masche.
1 parent 17ed8cd commit f1b31e3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmd/daemon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func scanProcs(wg *sync.WaitGroup) {
154154

155155
for _, process := range processes {
156156
processScanStartTime := time.Now()
157-
libraries, harderror, softerrors := lib.GetLibrariesForPid(process.Id, true)
157+
libraries, harderror, softerrors := lib.GetLibrariesForPid((*process).GetId(), true)
158158
processScanEndTime := time.Now()
159159
if harderror != nil {
160160
log.WithError(harderror).Error("Unable to list libraries for Process: %v", process)

lib/GetAllPids.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import (
55
"github.com/polyverse/masche/process"
66
)
77

8-
func GetAllPids() ([]*process.LinuxProcessInfo, error, []error) {
8+
func GetAllPids() ([]*process.ProcessInfo, error, []error) {
99
pids, harderror, softerrors := process.GetAllPids()
1010
if harderror != nil {
1111
return nil, errors.Wrapf(harderror, "Unable to list PIDs on this host."), softerrors
1212
} // if
1313

14-
pidinfos := []*process.LinuxProcessInfo{}
14+
pidinfos := []*process.ProcessInfo{}
1515

1616
for _, pid := range pids {
17-
pinfo, err := process.ProcessInfo(pid)
17+
pinfo, err := process.GetProcessInfo(pid)
1818
softerrors = append(softerrors, err)
1919
pidinfos = append(pidinfos, pinfo)
2020
}

lib/types/process.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package types
33
import "github.com/polyverse/masche/process"
44

55
type Process struct {
6-
Info *process.LinuxProcessInfo `json:"info"`
6+
Info *process.ProcessInfo `json:"info"`
77
Libraries []Library `json:"libraries"`
88
}
99

0 commit comments

Comments
 (0)