Class: KnuckleCluster::AgentRegistry

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/knuckle_cluster/agent_registry.rb

Instance Method Summary collapse

Constructor Details

#initialize(aws_client_config:, cluster_name:) ⇒ AgentRegistry

Returns a new instance of AgentRegistry.



10
11
12
13
# File 'lib/knuckle_cluster/agent_registry.rb', line 10

def initialize(aws_client_config:, cluster_name:)
  @aws_client_config = aws_client_config
  @cluster_name = cluster_name
end

Instance Method Details

#agentsObject



15
16
17
# File 'lib/knuckle_cluster/agent_registry.rb', line 15

def agents
  @agents ||= load_agents
end

#find_by(container_instance_arn:) ⇒ Object



19
20
21
# File 'lib/knuckle_cluster/agent_registry.rb', line 19

def find_by(container_instance_arn:)
  agents_by_container_instance_arn[container_instance_arn]&.first
end