Class: DockerEngineRuby::Models::TaskSpec

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

Defined Under Namespace

Classes: ContainerSpec, LogDriver, Network, NetworkAttachmentSpec, Placement, PluginSpec, Resources, RestartPolicy

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(kind: nil, value: nil) ⇒ Object

Parameters:

  • kind (String) (defaults to: nil)
  • value (String) (defaults to: nil)


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


Instance Attribute Details

#container_specDockerEngineRuby::Models::TaskSpec::ContainerSpec?

Container spec for the service.

<p><br /></p>

> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually > exclusive. PluginSpec is only used when the Runtime field is set to plugin. > NetworkAttachmentSpec is used when the Runtime field is set to attachment.



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

optional :container_spec, -> { DockerEngineRuby::TaskSpec::ContainerSpec }, api_name: :ContainerSpec

#force_updateInteger?

A counter that triggers an update even if no relevant parameters have been changed.

Returns:

  • (Integer, nil)


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

optional :force_update, Integer, api_name: :ForceUpdate

#log_driverDockerEngineRuby::Models::TaskSpec::LogDriver?

Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified.



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

optional :log_driver, -> { DockerEngineRuby::TaskSpec::LogDriver }, api_name: :LogDriver

#network_attachment_specDockerEngineRuby::Models::TaskSpec::NetworkAttachmentSpec?

Read-only spec type for non-swarm containers attached to swarm overlay networks.

<p><br /></p>

> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually > exclusive. PluginSpec is only used when the Runtime field is set to plugin. > NetworkAttachmentSpec is used when the Runtime field is set to attachment.



43
44
45
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 43

optional :network_attachment_spec,
-> { DockerEngineRuby::TaskSpec::NetworkAttachmentSpec },
api_name: :NetworkAttachmentSpec

#networksArray<DockerEngineRuby::Models::TaskSpec::Network>?

Specifies which networks the service should attach to.



51
52
53
# File 'lib/docker_engine_ruby/models/task_spec.rb', line 51

optional :networks,
-> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::Network] },
api_name: :Networks

#placementDockerEngineRuby::Models::TaskSpec::Placement?



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

optional :placement, -> { DockerEngineRuby::TaskSpec::Placement }, api_name: :Placement

#plugin_specDockerEngineRuby::Models::TaskSpec::PluginSpec?

Plugin spec for the service. _(Experimental release only.)_

<p><br /></p>

> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually > exclusive. PluginSpec is only used when the Runtime field is set to plugin. > NetworkAttachmentSpec is used when the Runtime field is set to attachment.



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

optional :plugin_spec, -> { DockerEngineRuby::TaskSpec::PluginSpec }, api_name: :PluginSpec

#resourcesDockerEngineRuby::Models::TaskSpec::Resources?

Resource requirements which apply to each individual container created as part of the service.



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

optional :resources, -> { DockerEngineRuby::TaskSpec::Resources }, api_name: :Resources

#restart_policyDockerEngineRuby::Models::TaskSpec::RestartPolicy?

Specification for the restart policy which applies to containers created as part of this service.



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

optional :restart_policy, -> { DockerEngineRuby::TaskSpec::RestartPolicy }, api_name: :RestartPolicy

#runtimeString?

Runtime is the type of runtime specified for the task executor.

Returns:

  • (String, nil)


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

optional :runtime, String, api_name: :Runtime