health check: add custom health checker (#596)
This patch adds the extension health check, with redis as the first example. Signed-off-by: Dhi Aurrahman <dio@rockybars.com>pull/603/merge
parent
42104457b1
commit
4af506d694
6 changed files with 41 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||||||
|
load("//bazel:api_build_system.bzl", "api_proto_library") |
||||||
|
|
||||||
|
licenses(["notice"]) # Apache 2 |
||||||
|
|
||||||
|
api_proto_library( |
||||||
|
name = "redis", |
||||||
|
srcs = ["redis.proto"], |
||||||
|
) |
@ -0,0 +1,16 @@ |
|||||||
|
syntax = "proto3"; |
||||||
|
|
||||||
|
package envoy.config.health_checker.redis.v2; |
||||||
|
option go_package = "v2"; |
||||||
|
|
||||||
|
// [#not-implemented-hide:] |
||||||
|
// [#protodoc-title: Redis] |
||||||
|
// Redis :ref:`configuration overview <config_health_checker_redis>`. |
||||||
|
// Configuration for the Redis custom health checker. |
||||||
|
message Redis { |
||||||
|
// If set, optionally perform ``EXISTS <key>`` instead of ``PING``. A return value |
||||||
|
// from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other |
||||||
|
// than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance |
||||||
|
// by setting the specified key to any value and waiting for traffic to drain. |
||||||
|
string key = 1; |
||||||
|
} |
Loading…
Reference in new issue