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