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.
19 20 21 |
# File 'lib/osctld/devices/v2/configurator.rb', line 19 def abs_cgroup_path raise NotImplementedError end |
#attach_prog(devices) ⇒ Object (protected)
23 24 25 26 27 28 29 30 |
# File 'lib/osctld/devices/v2/configurator.rb', line 23 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.
14 15 16 |
# File 'lib/osctld/devices/v2/configurator.rb', line 14 def cgroup_path raise NotImplementedError end |
#get_prog(devices) ⇒ Object (protected)
32 33 34 |
# File 'lib/osctld/devices/v2/configurator.rb', line 32 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 |