Async::GRPC::XDSSourceAsyncGRPCXDSHTTPHealthCheck

module HTTPHealthCheck

Builds Envoy HTTP active health checks.

Definitions

def build(path, interval: 1, timeout: 1, unhealthy_threshold: 2, healthy_threshold: 1)

Build an HTTP active health check.

Signature

parameter path String

The request path used to check each endpoint.

parameter interval Numeric

The interval between checks in seconds.

parameter timeout Numeric

The check timeout in seconds.

parameter unhealthy_threshold Integer

The consecutive failures required to mark an endpoint unhealthy.

parameter healthy_threshold Integer

The consecutive successes required to mark an endpoint healthy.

returns Envoy::Config::Core::V3::HealthCheck

The generated health check.

Implementation

def build(path, interval: 1, timeout: 1, unhealthy_threshold: 2, healthy_threshold: 1)
	Envoy::Config::Core::V3::HealthCheck.new(
		timeout: duration(timeout),
		interval: duration(interval),
		unhealthy_threshold: Google::Protobuf::UInt32Value.new(value: Integer(unhealthy_threshold)),
		healthy_threshold: Google::Protobuf::UInt32Value.new(value: Integer(healthy_threshold)),
		http_health_check: Envoy::Config::Core::V3::HealthCheck::HttpHealthCheck.new(path: path.to_s)
	)
end