Google Cloud Run V2 Client - Class Probe (0.9.1)

Reference documentation and code samples for the Google Cloud Run V2 Client class Probe.

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

Generated from protobuf message google.cloud.run.v2.Probe

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ initial_delay_seconds int

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.

↳ timeout_seconds int

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.

↳ period_seconds int

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.

↳ failure_threshold int

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

↳ http_get Google\Cloud\Run\V2\HTTPGetAction

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

↳ tcp_socket Google\Cloud\Run\V2\TCPSocketAction

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

↳ grpc Google\Cloud\Run\V2\GRPCAction

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

getInitialDelaySeconds

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.

Returns
TypeDescription
int

setInitialDelaySeconds

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTimeoutSeconds

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.

Returns
TypeDescription
int

setTimeoutSeconds

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getPeriodSeconds

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.

Returns
TypeDescription
int

setPeriodSeconds

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getFailureThreshold

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

Returns
TypeDescription
int

setFailureThreshold

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getHttpGet

HTTPGet specifies the http request to perform.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Returns
TypeDescription
Google\Cloud\Run\V2\HTTPGetAction|null

hasHttpGet

setHttpGet

HTTPGet specifies the http request to perform.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Parameter
NameDescription
var Google\Cloud\Run\V2\HTTPGetAction
Returns
TypeDescription
$this

getTcpSocket

TCPSocket specifies an action involving a TCP port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Returns
TypeDescription
Google\Cloud\Run\V2\TCPSocketAction|null

hasTcpSocket

setTcpSocket

TCPSocket specifies an action involving a TCP port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Parameter
NameDescription
var Google\Cloud\Run\V2\TCPSocketAction
Returns
TypeDescription
$this

getGrpc

GRPC specifies an action involving a gRPC port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Returns
TypeDescription
Google\Cloud\Run\V2\GRPCAction|null

hasGrpc

setGrpc

GRPC specifies an action involving a gRPC port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

Parameter
NameDescription
var Google\Cloud\Run\V2\GRPCAction
Returns
TypeDescription
$this

getProbeType

Returns
TypeDescription
string