lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Netcls.pm

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