procfind

package
v0.0.0-...-d8e83ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPidNotFound    = errors.New("pid not found")
	ErrExeNotFound    = errors.New("executable not found")
	ErrEnvVarNotFound = errors.New("environment variable missing")
)

Functions

func Argv

func Argv(pid Pid) []string

func FindExe

func FindExe(exename, pathlist string) (string, error)

func Match

func Match(cmdline []string, pid Pid) bool

func MatchAll

func MatchAll(cmdline []string, pids []Pid) bool

func MatchArgv

func MatchArgv(argv, model []string) (bool, error)

func Path

func Path() (string, error)

func ScanEntries

func ScanEntries(em EntryMatcher) (int, error)

func Which

func Which(exename string) (string, error)

Types

type Entry

type Entry interface {
	AddPid(p Pid)
}

type EntryMatcher

type EntryMatcher interface {
	MatchArgv(argv []string) (Entry, bool)
}

type Pid

type Pid int32

func Find

func Find(argv []string) (Pid, error)

func FindAll

func FindAll(argv []string) ([]Pid, error)

func PidOf

func PidOf(exename string) ([]Pid, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL