Class: DockerEngineRuby::Models::Service::Endpoint::Spec::Port

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_ruby/models/service.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 DockerEngineRuby::Models::Service::Endpoint::Spec::Port for more details.

Parameters:



# File 'lib/docker_engine_ruby/models/service.rb', line 293


Instance Attribute Details

#nameString?

Returns:

  • (String, nil)


257
# File 'lib/docker_engine_ruby/models/service.rb', line 257

optional :name, String, api_name: :Name

#protocolSymbol, ...



262
263
264
# File 'lib/docker_engine_ruby/models/service.rb', line 262

optional :protocol,
enum: -> { DockerEngineRuby::Service::Endpoint::Spec::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.



283
284
285
# File 'lib/docker_engine_ruby/models/service.rb', line 283

optional :publish_mode,
enum: -> { DockerEngineRuby::Service::Endpoint::Spec::Port::PublishMode },
api_name: :PublishMode

#published_portInteger?

The port on the swarm hosts.

Returns:

  • (Integer, nil)


270
# File 'lib/docker_engine_ruby/models/service.rb', line 270

optional :published_port, Integer, api_name: :PublishedPort

#target_portInteger?

The port inside the container.

Returns:

  • (Integer, nil)


291
# File 'lib/docker_engine_ruby/models/service.rb', line 291

optional :target_port, Integer, api_name: :TargetPort

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_ruby/models/service.rb', line 315