Class: Google::Apis::TrafficdirectorV3::SocketAddress

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/trafficdirector_v3/classes.rb,
lib/google/apis/trafficdirector_v3/representations.rb,
lib/google/apis/trafficdirector_v3/representations.rb

Overview

[#next-free-field: 8]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SocketAddress

Returns a new instance of SocketAddress.



1431
1432
1433
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1431

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#addressString

The address for this socket. :ref:Listeners will bind to the address. An empty address is not allowed. Specify 0.0.0.0 or :: to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref: FilterChainMatch.] When used within an upstream :ref:BindConfig, the address controls the source address of outbound connections. For :ref: clusters, the cluster type determines whether the address must be an IP ( STATIC or EDS clusters) or a hostname resolved by DNS (STRICT_DNS or LOGICAL_DNS clusters). Address resolution can be customized via :ref: resolver_name. Corresponds to the JSON property address

Returns:

  • (String)


1386
1387
1388
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1386

def address
  @address
end

#ipv4_compatBoolean Also known as: ipv4_compat?

When binding to an IPv6 address above, this enables IPv4 compatibility_. Binding to :: will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ::FFFF:. Corresponds to the JSON property ipv4Compat

Returns:

  • (Boolean)


1393
1394
1395
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1393

def ipv4_compat
  @ipv4_compat
end

#named_portString

This is only valid if :ref:resolver_name is specified below and the named resolver is capable of named port resolution. Corresponds to the JSON property namedPort

Returns:

  • (String)


1400
1401
1402
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1400

def named_port
  @named_port
end

#network_namespace_filepathString

Filepath that specifies the Linux network namespace this socket will be created in (see man 7 network_namespaces). If this field is set, Envoy will create the socket in the specified network namespace. .. note:: Setting this parameter requires Envoy to run with the CAP_NET_ADMIN capability. .. attention:: Network namespaces are only configurable on Linux. Otherwise, this field has no effect. Corresponds to the JSON property networkNamespaceFilepath

Returns:

  • (String)


1410
1411
1412
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1410

def network_namespace_filepath
  @network_namespace_filepath
end

#port_valueFixnum

Corresponds to the JSON property portValue

Returns:

  • (Fixnum)


1415
1416
1417
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1415

def port_value
  @port_value
end

#protocolString

Corresponds to the JSON property protocol

Returns:

  • (String)


1420
1421
1422
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1420

def protocol
  @protocol
end

#resolver_nameString

The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with STRICT_DNS or LOGICAL_DNS will generate an error at runtime. Corresponds to the JSON property resolverName

Returns:

  • (String)


1429
1430
1431
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1429

def resolver_name
  @resolver_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1436
1437
1438
1439
1440
1441
1442
1443
1444
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1436

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @ipv4_compat = args[:ipv4_compat] if args.key?(:ipv4_compat)
  @named_port = args[:named_port] if args.key?(:named_port)
  @network_namespace_filepath = args[:network_namespace_filepath] if args.key?(:network_namespace_filepath)
  @port_value = args[:port_value] if args.key?(:port_value)
  @protocol = args[:protocol] if args.key?(:protocol)
  @resolver_name = args[:resolver_name] if args.key?(:resolver_name)
end