Documentation ¶
Index ¶
- Variables
- type Process
- func (p *Process) GetPid() (int64, error)
- func (p *Process) Reload() error
- func (p *Process) Restart() error
- func (p *Process) Save(path string) error
- func (p *Process) SetApparmor(profile string)
- func (p *Process) SetCreds(uid uint32, gid uint32)
- func (p *Process) Signal(signal int64) error
- func (p *Process) Start() error
- func (p *Process) StartWithFiles(fds []*os.File) error
- func (p *Process) Stop() error
- func (p *Process) Wait() (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotRunning = fmt.Errorf("The process isn't running")
ErrNotRunning is returned when performing an action against a stopped process.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct { Name string `yaml:"name"` Args []string `yaml:"args,flow"` Apparmor string `yaml:"apparmor"` PID int64 `yaml:"pid"` Stdout string `yaml:"stdout"` Stderr string `yaml:"stderr"` UID uint32 `yaml:"uid"` GID uint32 `yaml:"gid"` SetGroups bool `yaml:"set_groups"` // contains filtered or unexported fields }
Process struct. Has ability to set runtime arguments
func ImportProcess ¶
ImportProcess imports a saved process into a subprocess object.
func NewProcess ¶
NewProcess is a constructor for a process object. Represents a process with argument config. Returns an address to process
func (*Process) Save ¶
Save will save the given process object to a YAML file. Can be imported at a later point.
func (*Process) SetApparmor ¶
SetApparmor allows setting the AppArmor profile.
func (*Process) StartWithFiles ¶
StartWithFiles will start the given process object with extra file descriptors
Click to show internal directories.
Click to hide internal directories.