Class: KnuckleCluster::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/knuckle_cluster/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arn:, container_instance_arn:, agent:, definition:, name:, task_registry:) ⇒ Task

Returns a new instance of Task.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/knuckle_cluster/task.rb', line 3

def initialize(
  arn:,
  container_instance_arn:,
  agent:,
  definition:,
  name:,
  task_registry:
)
  @arn = arn
  @container_instance_arn = container_instance_arn
  @agent = agent
  @definition = definition
  @name = name
  @task_registry = task_registry
end

Instance Attribute Details

#agentObject (readonly)

Returns the value of attribute agent.



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

def agent
  @agent
end

#arnObject (readonly)

Returns the value of attribute arn.



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

def arn
  @arn
end

#container_instance_arnObject (readonly)

Returns the value of attribute container_instance_arn.



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

def container_instance_arn
  @container_instance_arn
end

#definitionObject (readonly)

Returns the value of attribute definition.



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

def definition
  @definition
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#task_registryObject (readonly)

Returns the value of attribute task_registry.



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

def task_registry
  @task_registry
end

Instance Method Details

#containersObject



21
22
23
# File 'lib/knuckle_cluster/task.rb', line 21

def containers
  task_registry.containers_where(task: self)
end