Class: DockerEngineRuby::Models::TaskSpec::Resources

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_ruby/models/task_spec.rb

Overview

See Also:

Defined Under Namespace

Classes: Limits, Reservations

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(memory_bytes: nil, nano_cpus: nil, pids: nil) ⇒ Object

An object describing a limit on resources which can be requested by a task.

Parameters:

  • memory_bytes (Integer) (defaults to: nil)
  • nano_cpus (Integer) (defaults to: nil)
  • pids (Integer) (defaults to: nil)

    Limits the maximum number of PIDs in the container. Set 0 for unlimited.



# File 'lib/docker_engine_ruby/models/task_spec.rb', line 1260

Instance Attribute Details

#limitsDockerEngineRuby::Models::TaskSpec::Resources::Limits?

An object describing a limit on resources which can be requested by a task.



1239
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 1239

optional :limits, -> { DockerEngineRuby::TaskSpec::Resources::Limits }, api_name: :Limits

#memory_swappinessInteger?

Returns:

  • (Integer, nil)


1244
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 1244

optional :memory_swappiness, Integer, api_name: :MemorySwappiness, nil?: true

#reservationsDockerEngineRuby::Models::TaskSpec::Resources::Reservations?

An object describing the resources which can be advertised by a node and requested by a task.



1251
1252
1253
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 1251

optional :reservations,
-> { DockerEngineRuby::TaskSpec::Resources::Reservations },
api_name: :Reservations

#swap_bytesInteger?

Returns:

  • (Integer, nil)


1258
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 1258

optional :swap_bytes, Integer, api_name: :SwapBytes, nil?: true