Class: Google::Apis::RunV2::GoogleCloudRunV2Probe

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

Overview

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2Probe

Returns a new instance of GoogleCloudRunV2Probe.



1337
1338
1339
# File 'lib/google/apis/run_v2/classes.rb', line 1337

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

Instance Attribute Details

#failure_thresholdFixnum

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Corresponds to the JSON property failureThreshold

Returns:

  • (Fixnum)


1300
1301
1302
# File 'lib/google/apis/run_v2/classes.rb', line 1300

def failure_threshold
  @failure_threshold
end

#grpcGoogle::Apis::RunV2::GoogleCloudRunV2GrpcAction

GRPCAction describes an action involving a GRPC port. Corresponds to the JSON property grpc



1305
1306
1307
# File 'lib/google/apis/run_v2/classes.rb', line 1305

def grpc
  @grpc
end

#http_getGoogle::Apis::RunV2::GoogleCloudRunV2HttpGetAction

HTTPGetAction describes an action based on HTTP Get requests. Corresponds to the JSON property httpGet



1310
1311
1312
# File 'lib/google/apis/run_v2/classes.rb', line 1310

def http_get
  @http_get
end

#initial_delay_secondsFixnum

Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Corresponds to the JSON property initialDelaySeconds

Returns:

  • (Fixnum)


1317
1318
1319
# File 'lib/google/apis/run_v2/classes.rb', line 1317

def initial_delay_seconds
  @initial_delay_seconds
end

#period_secondsFixnum

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. Corresponds to the JSON property periodSeconds

Returns:

  • (Fixnum)


1324
1325
1326
# File 'lib/google/apis/run_v2/classes.rb', line 1324

def period_seconds
  @period_seconds
end

#tcp_socketGoogle::Apis::RunV2::GoogleCloudRunV2TcpSocketAction

TCPSocketAction describes an action based on opening a socket Corresponds to the JSON property tcpSocket



1329
1330
1331
# File 'lib/google/apis/run_v2/classes.rb', line 1329

def tcp_socket
  @tcp_socket
end

#timeout_secondsFixnum

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. Corresponds to the JSON property timeoutSeconds

Returns:

  • (Fixnum)


1335
1336
1337
# File 'lib/google/apis/run_v2/classes.rb', line 1335

def timeout_seconds
  @timeout_seconds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1342
1343
1344
1345
1346
1347
1348
1349
1350
# File 'lib/google/apis/run_v2/classes.rb', line 1342

def update!(**args)
  @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold)
  @grpc = args[:grpc] if args.key?(:grpc)
  @http_get = args[:http_get] if args.key?(:http_get)
  @initial_delay_seconds = args[:initial_delay_seconds] if args.key?(:initial_delay_seconds)
  @period_seconds = args[:period_seconds] if args.key?(:period_seconds)
  @tcp_socket = args[:tcp_socket] if args.key?(:tcp_socket)
  @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds)
end