« lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v2/CPU.pm
↑ Summary
lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v2/IO.pm »
| 1 | package Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Freezer; | ||
| 2 | |||
| 3 | 15 | ▶ | use Mojo::Base -base; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 15 | ▶ | use constant { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 15 | STATE_INTERFACE => 'freezer.state', | |
| 7 | SELF_FREEZING_INTERFACE => 'freezer.self_freezing', | ||
| 8 | PARENT_FREEZING_INTERFACE => 'freezer.parent_freezing', | ||
| 9 | 15 | }; | |
| 10 | |||
| 11 | 0 | ▶ | has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 12 | |||
| 13 | 2 | ▶ | sub state { shift->cgroup->_setget(STATE_INTERFACE, @_) } |
|
Subroutine
state: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 1 | ▶ | sub self_freezing { shift->cgroup->_list(SELF_FREEZING_INTERFACE) } |
|
Subroutine
self_freezing: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | 1 | ▶ | sub parent_freezing { shift->cgroup->_list(PARENT_FREEZING_INTERFACE) } |
|
Subroutine
parent_freezing: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 16 | |||
| 17 | 15 | 1; | |
| 18 | |||
| 19 | =encoding utf-8 | ||
| 20 | |||
| 21 | =head1 NAME | ||
| 22 | |||
| 23 | Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Freezer - CGroups v1 Freezer Controller. | ||
| 24 | |||
| 25 | =head1 SYNOPSIS | ||
| 26 | |||
| 27 | use Mojo::IOLoop::ReadWriteProcess::CGroup::v1; | ||
| 28 | |||
| 29 | my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new( name => "test" ); | ||
| 30 | |||
| 31 | $cgroup->freezer->state('FROZEN'); | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | This module uses features that are only available on Linux, | ||
| 36 | and requires cgroups and capability for unshare syscalls to achieve pid isolation. | ||
| 37 | |||
| 38 | =head1 METHODS | ||
| 39 | |||
| 40 | L<Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Freezer> inherits all methods from L<Mojo::Base> and implements | ||
| 41 | the following new ones. | ||
| 42 | |||
| 43 | =head1 LICENSE | ||
| 44 | |||
| 45 | Copyright (C) Ettore Di Giacinto. | ||
| 46 | |||
| 47 | This library is free software; you can redistribute it and/or modify | ||
| 48 | it under the same terms as Perl itself. | ||
| 49 | |||
| 50 | =head1 AUTHOR | ||
| 51 | |||
| 52 | Ettore Di Giacinto E<lt>edigiacinto@suse.comE<gt> | ||
| 53 | |||
| 54 | =cut | ||