Class: OsCtld::Devices::V2::Configurator
- Inherits:
-
Configurator
- Object
- Configurator
- OsCtld::Devices::V2::Configurator
- Defined in:
- lib/osctld/devices/v2/configurator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
- #prog_name ⇒ String readonly
Attributes inherited from Configurator
Instance Method Summary collapse
-
#abs_cgroup_path ⇒ String
protected
Absolute cgroup path.
- #attach_prog(devices) ⇒ Object protected
-
#cgroup_path ⇒ String
protected
Relative cgroup path.
- #get_prog(devices) ⇒ Object protected
- #init(devices) ⇒ Object
Methods inherited from Configurator
#add_device, #apply_changes, #dup, #initialize, #reconfigure, #remove_device
Constructor Details
This class inherits a constructor from OsCtld::Devices::Configurator
Instance Attribute Details
#prog_name ⇒ String (readonly)
6 7 8 |
# File 'lib/osctld/devices/v2/configurator.rb', line 6 def prog_name @prog_name end |
Instance Method Details
#abs_cgroup_path ⇒ String (protected)
Returns absolute cgroup path.
20 21 22 |
# File 'lib/osctld/devices/v2/configurator.rb', line 20 def abs_cgroup_path raise NotImplementedError end |
#attach_prog(devices) ⇒ Object (protected)
24 25 26 27 28 29 30 31 |
# File 'lib/osctld/devices/v2/configurator.rb', line 24 def attach_prog(devices) @prog_name = Devices::V2::BpfProgramCache.set( owner.pool.name, devices, abs_cgroup_path, prog_name: @prog_name ) end |
#cgroup_path ⇒ String (protected)
Returns relative cgroup path.
15 16 17 |
# File 'lib/osctld/devices/v2/configurator.rb', line 15 def cgroup_path raise NotImplementedError end |
#get_prog(devices) ⇒ Object (protected)
33 34 35 |
# File 'lib/osctld/devices/v2/configurator.rb', line 33 def get_prog(devices) @prog_name = Devices::V2::BpfProgramCache.get_prog_name(devices) end |
#init(devices) ⇒ Object
8 9 10 |
# File 'lib/osctld/devices/v2/configurator.rb', line 8 def init(devices) get_prog(devices) end |