procswap

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

func NewApp() *cli.App

NewApp returns a urfave/cli app that runs the loops to check for prioritized processes.

func ProcessList

func ProcessList(path string, ignored []string) ([]*godirwalk.Dirent, error)

ProcessList lists all .exe files in a given directory.

Types

type Loop

type Loop interface {
	Run()
	WithActionsEnabled(bool)
	WithLimit(int)
	WithPollInterval(int)
	WithPriorities([]*godirwalk.Dirent)
	WithPriorityScript(string)
	WithPs(ps.Ps)
	WithSwaps([]Swap)
}

Loop is the interface that runs indefinitely.

func NewLoop

func NewLoop() Loop

NewLoop returns a new Loop.

type Swap

type Swap interface {
	Path() string
	PID() int
	Start() error
	Kill() error
	Cmd() *exec.Cmd
	ShowOutput(bool)
}

Swap holds functions to implement starting and stopping of batch files.

func NewSwap

func NewSwap(path string) Swap

NewSwap returns and implementation of Swap.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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