oom

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2015 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package oom implements utility functions relating to out of memory management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeOomAdjuster

type FakeOomAdjuster struct{}

type OomAdjuster

type OomAdjuster struct {
	ApplyOomScoreAdj          func(pid int, oomScoreAdj int) error
	ApplyOomScoreAdjContainer func(cgroupName string, oomScoreAdj, maxTries int) error
	// contains filtered or unexported fields
}

This is a struct instead of an interface to allow injection of process ID listers and applying OOM score in tests. TODO: make this an interface, and inject a mock ioutil struct for testing.

func NewFakeOomAdjuster

func NewFakeOomAdjuster() *OomAdjuster

func NewOomAdjuster

func NewOomAdjuster() *OomAdjuster

Jump to

Keyboard shortcuts

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