Class: DockerEngineRuby::Models::TaskSpec::ContainerSpec::HealthCheck

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

Overview

See Also:

  • DockerEngineRuby::Models::TaskSpec::ContainerSpec#health_check

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 ⇒ Object



465
# File 'sig/docker_engine_ruby/models/task_spec.rbs', line 465

def initialize: (

Instance Attribute Details

#interval ⇒ Integer?

The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.



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

optional :interval, Integer, api_name: :Interval

#retries ⇒ Integer?

The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.



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

optional :retries, Integer, api_name: :Retries

#start_interval ⇒ Integer?

The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit.



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

optional :start_interval, Integer, api_name: :StartInterval

#start_period ⇒ Integer?

Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.



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

optional :start_period, Integer, api_name: :StartPeriod

#test_ ⇒ Array<String>?

The test to perform. Possible values are:

  • [] inherit healthcheck from image or parent image
  • ["NONE"] disable healthcheck
  • ["CMD", args...] exec arguments directly
  • ["CMD-SHELL", command] run command with system's default shell

A non-zero exit code indicates a failed healthcheck:

  • 0 healthy
  • 1 unhealthy
  • 2 reserved (treated as unhealthy)
  • other values: error running probe


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

optional :test_, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Test

#timeout ⇒ Integer?

The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

If the health check command does not complete within this timeout, the check is considered failed and the health check process is forcibly terminated without a graceful shutdown.



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

optional :timeout, Integer, api_name: :Timeout

Instance Method Details

#to_hash ⇒ {



474
# File 'sig/docker_engine_ruby/models/task_spec.rbs', line 474

def to_hash: -> {