23 lines
363 B
Go
23 lines
363 B
Go
package common
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
type (
|
|
ProcAttributes struct {
|
|
Name string
|
|
Cmdline []string
|
|
Username string
|
|
PID int
|
|
StartTime time.Time
|
|
}
|
|
|
|
MatchNamer interface {
|
|
// MatchAndName returns false if the match failed, otherwise
|
|
// true and the resulting name.
|
|
MatchAndName(ProcAttributes) (bool, string)
|
|
fmt.Stringer
|
|
}
|
|
)
|