Class: Google::Apis::RunV1alpha1::TcpSocketAction

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

Overview

TCPSocketAction describes an action based on opening a socket

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TcpSocketAction

Returns a new instance of TcpSocketAction.



4413
4414
4415
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4413

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

Instance Attribute Details

#hostString

Optional: Host name to connect to, defaults to the pod IP. +optional Corresponds to the JSON property host

Returns:

  • (String)


4403
4404
4405
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4403

def host
  @host
end

#portGoogle::Apis::RunV1alpha1::IntOrString

IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. Corresponds to the JSON property port



4411
4412
4413
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4411

def port
  @port
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4418
4419
4420
4421
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4418

def update!(**args)
  @host = args[:host] if args.key?(:host)
  @port = args[:port] if args.key?(:port)
end