Documentation ¶
Overview ¶
Utility for testing cgroup operations.
Creates a mock of the cgroup filesystem for the duration of the test.
Index ¶
- Variables
- func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error)
- func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error
- func GetPids(c *cgroups.Cgroup) ([]int, error)
- func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error)
- func NewCgroupTestUtil(subsystem string, t *testing.T) *cgroupTestUtil
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 Freeze ¶
func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error
Freeze toggles the container's freezer cgroup depending on the state provided
func NewCgroupTestUtil ¶
Creates a new test util for the specified subsystem
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.