os

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AbortTimeoutSec = 10
)

Variables

This section is empty.

Functions

func NewBoundedExecer

func NewBoundedExecer(memCap scootexecer.Memory, getMemUtilization func() (int64, error), stat stats.StatsReceiver) *execer

NewBoundedExecer returns an execer with a ProcGetter and, if non-zero values are provided, a memCap, overriding memory utilization function, and a StatsReceiver

func NewProcWatcher

func NewProcWatcher() *procWatcher

Types

type ProcInfo

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

func (ProcInfo) Pid

func (p ProcInfo) Pid() int

type ProcessWatcher

type ProcessWatcher interface {
	GetProcs() (map[int]ProcInfo, error)
	MemUsage(int) (scootexecer.Memory, error)
	LogProcs(*process, log.Level, io.Writer)
}

Used for mocking memCap monitoring

type WriterDelegater

type WriterDelegater interface {
	// Return an underlying Writer. Why? Because some methods type assert to
	// a more specific type and are more clever (e.g., if it's an *os.File, hook it up
	// directly to a new process's stdout/stderr.)
	// We care about this cleverness, so Output both is-a and has-a Writer
	// Cf. runner/runners/local_output.go
	WriterDelegate() io.Writer
}

Jump to

Keyboard shortcuts

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