agentproc

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package agentproc contains logic for interfacing with local processes running in the same context as the agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	Dir         string
	CmdLine     string
	PID         int32
	OOMScoreAdj int
}

func List

func List(fs afero.Fs, syscaller Syscaller) ([]*Process, error)

func (*Process) Cmd

func (p *Process) Cmd() string

func (*Process) Niceness

func (p *Process) Niceness(sc Syscaller) (int, error)

func (*Process) SetNiceness

func (p *Process) SetNiceness(sc Syscaller, score int) error

type Syscaller

type Syscaller interface {
	SetPriority(pid int32, priority int) error
	GetPriority(pid int32) (int, error)
	Kill(pid int32, sig syscall.Signal) error
}

func NewSyscaller

func NewSyscaller() Syscaller

type UnixSyscaller

type UnixSyscaller struct{}

func (UnixSyscaller) GetPriority

func (UnixSyscaller) GetPriority(pid int32) (int, error)

func (UnixSyscaller) Kill

func (UnixSyscaller) Kill(pid int32, sig syscall.Signal) error

func (UnixSyscaller) SetPriority

func (UnixSyscaller) SetPriority(pid int32, nice int) error

Directories

Path Synopsis
Package agentproctest contains utility functions for testing process management in the agent.
Package agentproctest contains utility functions for testing process management in the agent.

Jump to

Keyboard shortcuts

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