Module: Async::GRPC::XDS::HTTPHealthCheck

Extended by:
HTTPHealthCheck
Included in:
HTTPHealthCheck
Defined in:
lib/async/grpc/xds/http_health_check.rb

Overview

Builds Envoy HTTP active health checks.

Instance Method Summary collapse

Instance Method Details

#build(path, interval: 1, timeout: 1, unhealthy_threshold: 2, healthy_threshold: 1) ⇒ Object

Build an HTTP active health check.



25
26
27
28
29
30
31
32
33
# File 'lib/async/grpc/xds/http_health_check.rb', line 25

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