Class: DockerEngineAPI::Models::Task::Status::PortStatus::Port

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_api/models/task.rb

Defined Under Namespace

Modules: Protocol, PublishMode

Instance Attribute Summary collapse

Class Method 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(name: nil, protocol: nil, published_port: nil, publish_mode: nil, target_port: nil) ⇒ Object

Some parameter documentations has been truncated, see DockerEngineAPI::Models::Task::Status::PortStatus::Port for more details.

Parameters:



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/docker_engine_api/models/task.rb', line 336

class Port < DockerEngineAPI::Internal::Type::BaseModel
  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String, api_name: :Name

  # @!attribute protocol
  #
  #   @return [Symbol, DockerEngineAPI::Models::Task::Status::PortStatus::Port::Protocol, nil]
  optional :protocol,
           enum: -> { DockerEngineAPI::Task::Status::PortStatus::Port::Protocol },
           api_name: :Protocol

  # @!attribute published_port
  #   The port on the swarm hosts.
  #
  #   @return [Integer, nil]
  optional :published_port, Integer, api_name: :PublishedPort

  # @!attribute publish_mode
  #   The mode in which port is published.
  #
  #   <p><br /></p>
  #
  #   - "ingress" makes the target port accessible on every node, regardless of
  #     whether there is a task for the service running on that node or not.
  #   - "host" bypasses the routing mesh and publish the port directly on the swarm
  #     node where that service is running.
  #
  #   @return [Symbol, DockerEngineAPI::Models::Task::Status::PortStatus::Port::PublishMode, nil]
  optional :publish_mode,
           enum: -> { DockerEngineAPI::Task::Status::PortStatus::Port::PublishMode },
           api_name: :PublishMode

  # @!attribute target_port
  #   The port inside the container.
  #
  #   @return [Integer, nil]
  optional :target_port, Integer, api_name: :TargetPort

  # @!method initialize(name: nil, protocol: nil, published_port: nil, publish_mode: nil, target_port: nil)
  #   Some parameter documentations has been truncated, see
  #   {DockerEngineAPI::Models::Task::Status::PortStatus::Port} for more details.
  #
  #   @param name [String]
  #
  #   @param protocol [Symbol, DockerEngineAPI::Models::Task::Status::PortStatus::Port::Protocol]
  #
  #   @param published_port [Integer] The port on the swarm hosts.
  #
  #   @param publish_mode [Symbol, DockerEngineAPI::Models::Task::Status::PortStatus::Port::PublishMode] The mode in which port is published.
  #
  #   @param target_port [Integer] The port inside the container.

  # @see DockerEngineAPI::Models::Task::Status::PortStatus::Port#protocol
  module Protocol
    extend DockerEngineAPI::Internal::Type::Enum

    TCP = :tcp
    UDP = :udp
    SCTP = :sctp

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The mode in which port is published.
  #
  # <p><br /></p>
  #
  # - "ingress" makes the target port accessible on every node, regardless of
  #   whether there is a task for the service running on that node or not.
  # - "host" bypasses the routing mesh and publish the port directly on the swarm
  #   node where that service is running.
  #
  # @see DockerEngineAPI::Models::Task::Status::PortStatus::Port#publish_mode
  module PublishMode
    extend DockerEngineAPI::Internal::Type::Enum

    INGRESS = :ingress
    HOST = :host

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#nameString?

Returns:

  • (String, nil)


340
# File 'lib/docker_engine_api/models/task.rb', line 340

optional :name, String, api_name: :Name

#protocolSymbol, ...



345
346
347
# File 'lib/docker_engine_api/models/task.rb', line 345

optional :protocol,
enum: -> { DockerEngineAPI::Task::Status::PortStatus::Port::Protocol },
api_name: :Protocol

#publish_modeSymbol, ...

The mode in which port is published.

<p><br /></p>

  • “ingress” makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not.

  • “host” bypasses the routing mesh and publish the port directly on the swarm node where that service is running.



366
367
368
# File 'lib/docker_engine_api/models/task.rb', line 366

optional :publish_mode,
enum: -> { DockerEngineAPI::Task::Status::PortStatus::Port::PublishMode },
api_name: :PublishMode

#published_portInteger?

The port on the swarm hosts.

Returns:

  • (Integer, nil)


353
# File 'lib/docker_engine_api/models/task.rb', line 353

optional :published_port, Integer, api_name: :PublishedPort

#target_portInteger?

The port inside the container.

Returns:

  • (Integer, nil)


374
# File 'lib/docker_engine_api/models/task.rb', line 374

optional :target_port, Integer, api_name: :TargetPort

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_api/models/task.rb', line 398