Class: OsCtld::Config
- Inherits:
-
Object
show all
- Defined in:
- lib/osctld/config.rb
Overview
osctld config file interface
Defined Under Namespace
Classes: CpuPackage, CpuScheduler, GarbageCollector, Mbuffer, SendReceive, TrashBin
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
156
157
158
159
160
161
162
163
164
165
166
167
168
|
# File 'lib/osctld/config.rb', line 156
def initialize(path)
cfg = JSON.parse(File.read(path))
@debug = cfg.fetch('debug', false)
@apparmor_paths = cfg.fetch('apparmor_paths', [])
@enable_time_namespace = cfg.fetch('enable_time_namespace', true)
@ctstartmenu = cfg['ctstartmenu']
@enable_lock_registry = cfg.fetch('lock_registry', false)
@cpu_scheduler = CpuScheduler.new(cfg.fetch('cpu_scheduler', {}))
@send_receive = SendReceive.new(cfg.fetch('send_receive', {}))
@trash_bin = TrashBin.new(cfg.fetch('trash_bin', {}))
@garbage_collector = GarbageCollector.new(cfg.fetch('garbage_bin', {}))
end
|
Instance Attribute Details
#apparmor_paths ⇒ Array<String>
130
131
132
|
# File 'lib/osctld/config.rb', line 130
def apparmor_paths
@apparmor_paths
end
|
144
145
146
|
# File 'lib/osctld/config.rb', line 144
def cpu_scheduler
@cpu_scheduler
end
|
137
138
139
|
# File 'lib/osctld/config.rb', line 137
def
@ctstartmenu
end
|
#debug ⇒ Boolean
Also known as:
debug?
126
127
128
|
# File 'lib/osctld/config.rb', line 126
def debug
@debug
end
|
#enable_lock_registry ⇒ Boolean
Also known as:
enable_lock_registry?
140
141
142
|
# File 'lib/osctld/config.rb', line 140
def enable_lock_registry
@enable_lock_registry
end
|
#enable_time_namespace ⇒ Boolean
Also known as:
enable_time_namespace?
133
134
135
|
# File 'lib/osctld/config.rb', line 133
def enable_time_namespace
@enable_time_namespace
end
|
153
154
155
|
# File 'lib/osctld/config.rb', line 153
def garbage_collector
@garbage_collector
end
|
147
148
149
|
# File 'lib/osctld/config.rb', line 147
def send_receive
@send_receive
end
|
150
151
152
|
# File 'lib/osctld/config.rb', line 150
def trash_bin
@trash_bin
end
|