class Nomad::Evaluation

Public Instance Methods

allocations_for(id, **options) click to toggle source

Get the list of allocations for the given evaluation.

@param [String] id The full ID of the evaluation to get allocations

@return [Array<Alloc>]

# File lib/nomad/api/evaluation.rb, line 41
def allocations_for(id, **options)
  json = client.get("/v1/evaluation/#{CGI.escape(id)}/allocations", options)
  return json.map { |item| Alloc.decode(item) }
end
list(**options) click to toggle source

List allocations.

@param options [String] :prefix An optional prefix to filter

@return [Array<Eval>]

# File lib/nomad/api/evaluation.rb, line 21
def list(**options)
  json = client.get("/v1/evaluations", options)
  return json.map { |item| Eval.decode(item) }
end
read(id, **options) click to toggle source

Read a specific evaluation.

@param [String] id The full ID of the evaluation to read

@return [Eval]

# File lib/nomad/api/evaluation.rb, line 31
def read(id, **options)
  json = client.get("/v1/evaluation/#{CGI.escape(id)}", options)
  return Eval.decode(json)
end