Class: Krane::TaskConfig
- Inherits:
-
Object
- Object
- Krane::TaskConfig
- Defined in:
- lib/krane/task_config.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
- #global_kinds ⇒ Object
-
#initialize(context, namespace, logger = nil) ⇒ TaskConfig
constructor
A new instance of TaskConfig.
Constructor Details
#initialize(context, namespace, logger = nil) ⇒ TaskConfig
Returns a new instance of TaskConfig.
6 7 8 9 10 |
# File 'lib/krane/task_config.rb', line 6 def initialize(context, namespace, logger = nil) @context = context @namespace = namespace @logger = logger || FormattedLogger.build(@namespace, @context) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/krane/task_config.rb', line 4 def context @context end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
4 5 6 |
# File 'lib/krane/task_config.rb', line 4 def logger @logger end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
4 5 6 |
# File 'lib/krane/task_config.rb', line 4 def namespace @namespace end |
Instance Method Details
#global_kinds ⇒ Object
12 13 14 15 16 17 |
# File 'lib/krane/task_config.rb', line 12 def global_kinds @global_kinds ||= begin cluster_resource_discoverer = ClusterResourceDiscovery.new(task_config: self) cluster_resource_discoverer.global_resource_kinds end end |