From 7100161f641929ee2095a472432b6751d842ca4c Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Fri, 9 Feb 2018 16:02:27 -0800 Subject: [PATCH] Add gRPC fields to client api and agent check endpoint docs --- api/agent.go | 2 ++ website/source/api/agent/check.html.md | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/api/agent.go b/api/agent.go index 2c826660c..4e1ef0890 100644 --- a/api/agent.go +++ b/api/agent.go @@ -97,6 +97,8 @@ type AgentServiceCheck struct { Status string `json:",omitempty"` Notes string `json:",omitempty"` TLSSkipVerify bool `json:",omitempty"` + GRPC string `json:",omitempty"` + GRPCUseTLS bool `json:",omitempty"` // In Consul 0.7 and later, checks that are associated with a service // may also contain this optional DeregisterCriticalServiceAfter field, diff --git a/website/source/api/agent/check.html.md b/website/source/api/agent/check.html.md index f76c1e761..052693335 100644 --- a/website/source/api/agent/check.html.md +++ b/website/source/api/agent/check.html.md @@ -121,6 +121,15 @@ The table below shows this endpoint's support for container using the specified `Shell`. Note that `Shell` is currently only supported for Docker checks. +- `GRPC` `(string: "")` - Specifies a `gRPC` check's endpoint that supports the standard + [gRPC health checking protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + The state of the check will be updated at the given `Interval` by probing the configured + endpoint. + +- `GRPCUseTLS` `(bool: false)` - Specifies whether to use TLS for this `gRPC` health check. + If TLS is enabled, then by default, a valid TLS certificate is expected. Certificate + verification can be turned off by setting `TLSSkipVerify` to `true`. + - `HTTP` `(string: "")` - Specifies an `HTTP` check to perform a `GET` request against the value of `HTTP` (expected to be a URL) every `Interval`. If the response is any `2xx` code, the check is `passing`. If the response is `429 @@ -135,6 +144,10 @@ The table below shows this endpoint's support for - `Header` `(map[string][]string: {})` - Specifies a set of headers that should be set for `HTTP` checks. Each header can have multiple values. +- `Timeout` `(duration: 10s)` - Specifies a timeout for outgoing connections in the + case of a Script, HTTP, TCP, or gRPC check. Can be specified in the form of "10s" + or "5m" (i.e., 10 seconds or 5 minutes, respectively). + - `TLSSkipVerify` `(bool: false)` - Specifies if the certificate for an HTTPS check should not be verified.