fs

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Overview

Utility for testing cgroup operations.

Creates a mock of the cgroup filesystem for the duration of the test.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupportStat = errors.New("stats are not supported for subsystem")
	ErrNotValidFormat = errors.New("line is not a valid key value format")
)

Functions

func Apply

func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error)

func Freeze

func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error

Freeze toggles the container's freezer cgroup depending on the state provided

func GetPids

func GetPids(c *cgroups.Cgroup) ([]int, error)

func GetStats

func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error)

func NewCgroupTestUtil

func NewCgroupTestUtil(subsystem string, t *testing.T) *cgroupTestUtil

Creates a new test util for the specified subsystem

Types

This section is empty.

Jump to

Keyboard shortcuts

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