...

Package system

Overview ▾

type Default

type Default struct{}

func (Default) FindProcess

func (o Default) FindProcess(pid int) (ps.Process, error)

func (Default) PidExists

func (o Default) PidExists(pid int) (bool, error)

type Fake

type Fake struct {
    ProcessId int
    ParentId  int
    // PidTable is a map of pid => executable name of existing processes
    PidTable map[int]string
}

func (Fake) Executable

func (o Fake) Executable() string

func (Fake) FindProcess

func (o Fake) FindProcess(pid int) (ps.Process, error)

func (Fake) PPid

func (o Fake) PPid() int

func (Fake) Pid

func (o Fake) Pid() int

func (Fake) PidExists

func (o Fake) PidExists(pid int) (bool, error)

type System

type System interface {
    FindProcess(pid int) (ps.Process, error)
    PidExists(pid int) (bool, error)
}