Add native Go method for finding pids to procstat (#3559)

This commit is contained in:
Ben Aldrich
2018-02-01 16:14:27 -07:00
committed by Daniel Nelson
parent 9b4177d46c
commit 551c771bba
10 changed files with 301 additions and 13 deletions

View File

@@ -23,6 +23,13 @@ type Process interface {
RlimitUsage(bool) ([]process.RlimitStat, error)
}
type PIDFinder interface {
PidFile(path string) ([]PID, error)
Pattern(pattern string) ([]PID, error)
Uid(user string) ([]PID, error)
FullPattern(path string) ([]PID, error)
}
type Proc struct {
hasCPUTimes bool
tags map[string]string