Class: KnuckleCluster::Agent
- Inherits:
-
Object
- Object
- KnuckleCluster::Agent
- Defined in:
- lib/knuckle_cluster/agent.rb
Instance Attribute Summary collapse
-
#availability_zone ⇒ Object
readonly
Returns the value of attribute availability_zone.
-
#container_instance_arn ⇒ Object
readonly
Returns the value of attribute container_instance_arn.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#instance_id ⇒ Object
readonly
Returns the value of attribute instance_id.
-
#private_ip ⇒ Object
readonly
Returns the value of attribute private_ip.
-
#public_ip ⇒ Object
readonly
Returns the value of attribute public_ip.
-
#task_registry ⇒ Object
readonly
Returns the value of attribute task_registry.
Instance Method Summary collapse
-
#initialize(index:, instance_id:, public_ip:, private_ip:, availability_zone:, container_instance_arn: nil, task_registry: nil) ⇒ Agent
constructor
A new instance of Agent.
- #tasks ⇒ Object
Constructor Details
#initialize(index:, instance_id:, public_ip:, private_ip:, availability_zone:, container_instance_arn: nil, task_registry: nil) ⇒ Agent
Returns a new instance of Agent.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/knuckle_cluster/agent.rb', line 3 def initialize( index:, instance_id:, public_ip:, private_ip:, availability_zone:, container_instance_arn: nil, task_registry: nil ) @index = index @instance_id = instance_id @public_ip = public_ip @private_ip = private_ip @availability_zone = availability_zone @container_instance_arn = container_instance_arn @task_registry = task_registry end |
Instance Attribute Details
#availability_zone ⇒ Object (readonly)
Returns the value of attribute availability_zone.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def availability_zone @availability_zone end |
#container_instance_arn ⇒ Object (readonly)
Returns the value of attribute container_instance_arn.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def container_instance_arn @container_instance_arn end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def index @index end |
#instance_id ⇒ Object (readonly)
Returns the value of attribute instance_id.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def instance_id @instance_id end |
#private_ip ⇒ Object (readonly)
Returns the value of attribute private_ip.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def private_ip @private_ip end |
#public_ip ⇒ Object (readonly)
Returns the value of attribute public_ip.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def public_ip @public_ip end |
#task_registry ⇒ Object (readonly)
Returns the value of attribute task_registry.
21 22 23 |
# File 'lib/knuckle_cluster/agent.rb', line 21 def task_registry @task_registry end |
Instance Method Details
#tasks ⇒ Object
24 25 26 |
# File 'lib/knuckle_cluster/agent.rb', line 24 def tasks task_registry.where(container_instance_arn: container_instance_arn) end |