oom

package
v1.7.16-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

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 added in v1.2.0

type FakeOOMAdjuster struct{}

type OOMAdjuster added in v1.2.0

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 added in v1.2.0

func NewFakeOOMAdjuster() *OOMAdjuster

func NewOOMAdjuster added in v1.2.0

func NewOOMAdjuster() *OOMAdjuster

Jump to

Keyboard shortcuts

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