File Coverage

lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Netprio.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 12 14 85.7


line stmt bran cond sub pod time code
1             package Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Netprio;
2              
3 15     15   104 use Mojo::Base -base;
  15         32  
  15         141  
4              
5             use constant {
6 15         3058 PRIOIDX_INTERFACE => 'net_prio.prioidx',
7             IFPRIOMAP_INTERFACE => 'net_prio.ifpriomap',
8              
9 15     15   2688 };
  15         30  
10              
11             has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new };
12              
13 2     2 0 1516 sub ifpriomap { shift->cgroup->_setget(IFPRIOMAP_INTERFACE, @_) }
14 1     1 0 182 sub prioidx { shift->cgroup->_list(PRIOIDX_INTERFACE) }
15              
16             1;
17              
18             =encoding utf-8
19              
20             =head1 NAME
21              
22             Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Netprio - CGroups v1 Netprio Controller.
23              
24             =head1 SYNOPSIS
25              
26             use Mojo::IOLoop::ReadWriteProcess::CGroup::v1;
27              
28             my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new( name => "test" );
29              
30             $cgroup->netprio->prioidx;
31              
32             =head1 DESCRIPTION
33              
34             This module uses features that are only available on Linux,
35             and requires cgroups and capability for unshare syscalls to achieve pid isolation.
36              
37             =head1 METHODS
38              
39             L inherits all methods from L and implements
40             the following new ones.
41              
42             =head1 LICENSE
43              
44             Copyright (C) Ettore Di Giacinto.
45              
46             This library is free software; you can redistribute it and/or modify
47             it under the same terms as Perl itself.
48              
49             =head1 AUTHOR
50              
51             Ettore Di Giacinto Eedigiacinto@suse.comE
52              
53             =cut