process

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandChanged     = "Command changed"
	FileHashesChanged  = "Files changed"
	MetadataChanged    = "Metadata changed"
	EnvironmentChanged = "Env config changed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(context string) *Collector

func (*Collector) Collect

func (c *Collector) Collect() (List, error)

type DirtyInfo

type DirtyInfo []string

type ExecStopStrategy

type ExecStopStrategy struct {
	Config        *config.ExecConfig
	ProcessConfig *config.ProcessConfig
}

func (*ExecStopStrategy) Stop

func (s *ExecStopStrategy) Stop(p *Process) error

type InitialStartInfo

type InitialStartInfo struct {
	config.ProcessConfig
	Comment   string
	Md5Hashes map[string]string
}

type List

type List []*Process

func (*List) FindByConfigName

func (l *List) FindByConfigName(configName string) *Process

type Process

type Process struct {
	InitialStartInfo *InitialStartInfo
	gopsutil.Process
}

func NewFromPid

func NewFromPid(pid int32, initialStartInfo *InitialStartInfo) (*Process, error)

func Start

func Start(comment string, context string, processConfig *config.ProcessConfig) (*Process, error)

func (*Process) GetDirtyInfo

func (p *Process) GetDirtyInfo(processConfig *config.ProcessConfig) (DirtyInfo, error)

type SignalStopStrategy

type SignalStopStrategy struct {
	StopSignalConfig *config.SignalStopStrategyConfig
}

func (*SignalStopStrategy) Stop

func (s *SignalStopStrategy) Stop(p *Process) error

type StopStrategy

type StopStrategy interface {
	Stop(process *Process) error
}

Jump to

Keyboard shortcuts

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