Class: Nomad::JobSummary

Inherits:
Response show all
Defined in:
lib/nomad/api/job.rb

Constant Summary

Constants inherited from Response

Response::BUILTIN_LOADERS

Instance Attribute Summary collapse

Method Summary

Methods inherited from Response

#==, decode, #initialize, #to_h

Constructor Details

This class inherits a constructor from Nomad::Response

Instance Attribute Details

#childrenChildren (readonly)

The job children.

Returns:

  • (Children)


153
# File 'lib/nomad/api/job.rb', line 153

field :Children, as: :children, load: ->(item) { JobChildren.decode(item) }

#create_indexInteger (readonly)

The job summary create_index.

Returns:

  • (Integer)


158
# File 'lib/nomad/api/job.rb', line 158

field :CreateIndex, as: :create_index

#job_idString (readonly)

The job job_id.

Returns:

  • (String)


138
# File 'lib/nomad/api/job.rb', line 138

field :JobID, as: :job_id, load: :string_as_nil

#modify_indexInteger (readonly)

The job summary modify_index.

Returns:

  • (Integer)


163
# File 'lib/nomad/api/job.rb', line 163

field :ModifyIndex, as: :modify_index

#summaryHash<String, Object> (readonly)

The job summary.

Returns:

  • (Hash<String, Object>)


143
144
145
146
147
148
# File 'lib/nomad/api/job.rb', line 143

field :Summary, as: :summary, load: ->(item) {
  (item || {}).inject({}) do |h,(k,v)|
    h[k.to_s] = JobTaskGroupSummary.decode(v)
    h
  end
}