Class: Pangea::Contracts::ClusterResult
- Defined in:
- lib/pangea/contracts/cluster_result.rb
Overview
Base typed result object for the cluster phase. Wraps the backend-specific control plane reference and provides named accessors for common cluster outputs.
Unknown methods are delegated to control_plane_ref for backward compatibility with provider-specific attributes.
Instance Attribute Summary collapse
-
#control_plane_ref ⇒ Object
readonly
Returns the value of attribute control_plane_ref.
Instance Method Summary collapse
- #arn ⇒ Object
- #asg ⇒ Object
- #id ⇒ Object
-
#initialize(control_plane_ref) ⇒ ClusterResult
constructor
A new instance of ClusterResult.
- #launch_template ⇒ Object (also: #lt)
- #listener ⇒ Object
-
#method_missing(method_name, *args, &block) ⇒ Object
Forward unknown methods to control_plane_ref for backward compatibility.
-
#nlb ⇒ Object
Named accessors for common cluster components.
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
-
#security_group ⇒ Object
Convenience: return a pseudo-reference for security_group access Templates use result.cluster.security_group.id.
-
#sg_id ⇒ Object
Security group ID — the SG used for cluster nodes.
- #target_group ⇒ Object (also: #tg)
- #to_h ⇒ Object
Constructor Details
#initialize(control_plane_ref) ⇒ ClusterResult
Returns a new instance of ClusterResult.
30 31 32 |
# File 'lib/pangea/contracts/cluster_result.rb', line 30 def initialize(control_plane_ref) @control_plane_ref = control_plane_ref end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
Forward unknown methods to control_plane_ref for backward compatibility
81 82 83 84 85 86 87 |
# File 'lib/pangea/contracts/cluster_result.rb', line 81 def method_missing(method_name, *args, &block) if control_plane_ref.respond_to?(method_name) control_plane_ref.public_send(method_name, *args, &block) else super end end |
Instance Attribute Details
#control_plane_ref ⇒ Object (readonly)
Returns the value of attribute control_plane_ref.
28 29 30 |
# File 'lib/pangea/contracts/cluster_result.rb', line 28 def control_plane_ref @control_plane_ref end |
Instance Method Details
#arn ⇒ Object
72 73 74 |
# File 'lib/pangea/contracts/cluster_result.rb', line 72 def arn control_plane_ref.arn end |
#asg ⇒ Object
39 40 41 |
# File 'lib/pangea/contracts/cluster_result.rb', line 39 def asg control_plane_ref.asg end |
#id ⇒ Object
68 69 70 |
# File 'lib/pangea/contracts/cluster_result.rb', line 68 def id control_plane_ref.id end |
#launch_template ⇒ Object Also known as: lt
43 44 45 |
# File 'lib/pangea/contracts/cluster_result.rb', line 43 def launch_template control_plane_ref.lt end |
#listener ⇒ Object
53 54 55 |
# File 'lib/pangea/contracts/cluster_result.rb', line 53 def listener control_plane_ref.listener end |
#nlb ⇒ Object
Named accessors for common cluster components
35 36 37 |
# File 'lib/pangea/contracts/cluster_result.rb', line 35 def nlb control_plane_ref.nlb end |
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
89 90 91 |
# File 'lib/pangea/contracts/cluster_result.rb', line 89 def respond_to_missing?(method_name, include_private = false) control_plane_ref.respond_to?(method_name, include_private) || super end |
#security_group ⇒ Object
Convenience: return a pseudo-reference for security_group access Templates use result.cluster.security_group.id
64 65 66 |
# File 'lib/pangea/contracts/cluster_result.rb', line 64 def security_group SecurityGroupAccessor.new(control_plane_ref.sg_id) end |
#sg_id ⇒ Object
Security group ID — the SG used for cluster nodes
58 59 60 |
# File 'lib/pangea/contracts/cluster_result.rb', line 58 def sg_id control_plane_ref.sg_id end |
#target_group ⇒ Object Also known as: tg
48 49 50 |
# File 'lib/pangea/contracts/cluster_result.rb', line 48 def target_group control_plane_ref.tg end |
#to_h ⇒ Object
76 77 78 |
# File 'lib/pangea/contracts/cluster_result.rb', line 76 def to_h control_plane_ref.respond_to?(:to_h) ? control_plane_ref.to_h : {} end |