mirror of https://github.com/status-im/consul.git
change config option to H2PingUseTLS
This commit is contained in:
parent
092626986b
commit
c1ed3a9a94
|
@ -2707,7 +2707,7 @@ func (a *Agent) addCheck(check *structs.HealthCheck, chkType *structs.CheckType,
|
|||
chkType.Interval = checks.MinInterval
|
||||
}
|
||||
var tlsClientConfig *tls.Config
|
||||
if !chkType.H2PINGDisableTLS {
|
||||
if chkType.H2PingUseTLS {
|
||||
tlsClientConfig = a.tlsConfigurator.OutgoingTLSConfigForCheck(chkType.TLSSkipVerify, chkType.TLSServerName)
|
||||
tlsClientConfig.NextProtos = []string{http2.NextProtoTLS}
|
||||
}
|
||||
|
|
|
@ -866,7 +866,7 @@ func TestAgent_AddServiceWithH2CPINGCheck(t *testing.T) {
|
|||
H2PING: "localhost:12345",
|
||||
TLSSkipVerify: true,
|
||||
Interval: 10 * time.Second,
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1571,7 +1571,7 @@ func (b *builder) checkVal(v *CheckDefinition) *structs.CheckDefinition {
|
|||
FailuresBeforeCritical: intVal(v.FailuresBeforeCritical),
|
||||
FailuresBeforeWarning: intValWithDefault(v.FailuresBeforeWarning, intVal(v.FailuresBeforeCritical)),
|
||||
H2PING: stringVal(v.H2PING),
|
||||
H2PINGDisableTLS: boolVal(v.H2PINGDisableTLS),
|
||||
H2PingUseTLS: boolValWithDefault(v.H2PingUseTLS, true),
|
||||
DeregisterCriticalServiceAfter: b.durationVal(fmt.Sprintf("check[%s].deregister_critical_service_after", id), v.DeregisterCriticalServiceAfter),
|
||||
OutputMaxSize: intValWithDefault(v.OutputMaxSize, checks.DefaultBufSize),
|
||||
EnterpriseMeta: v.EnterpriseMeta.ToStructs(),
|
||||
|
|
|
@ -419,7 +419,7 @@ type CheckDefinition struct {
|
|||
Timeout *string `mapstructure:"timeout"`
|
||||
TTL *string `mapstructure:"ttl"`
|
||||
H2PING *string `mapstructure:"h2ping"`
|
||||
H2PINGDisableTLS *bool `mapstructure:"h2ping_disable_tls"`
|
||||
H2PingUseTLS *bool `mapstructure:"h2ping_use_tls"`
|
||||
SuccessBeforePassing *int `mapstructure:"success_before_passing"`
|
||||
FailuresBeforeWarning *int `mapstructure:"failures_before_warning"`
|
||||
FailuresBeforeCritical *int `mapstructure:"failures_before_critical"`
|
||||
|
|
|
@ -5307,7 +5307,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
Body: "wSjTy7dg",
|
||||
TCP: "RJQND605",
|
||||
H2PING: "9N1cSb5B",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 22164 * time.Second,
|
||||
OutputMaxSize: checks.DefaultBufSize,
|
||||
DockerContainerID: "ipgdFtjd",
|
||||
|
@ -5335,7 +5335,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "4jG5casb",
|
||||
H2PING: "HCHU7gEb",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 28767 * time.Second,
|
||||
DockerContainerID: "THW6u7rL",
|
||||
Shell: "C1Zt3Zwh",
|
||||
|
@ -5362,7 +5362,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "JY6fTTcw",
|
||||
H2PING: "rQ8eyCSF",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 18714 * time.Second,
|
||||
DockerContainerID: "qF66POS9",
|
||||
Shell: "sOnDy228",
|
||||
|
@ -5568,7 +5568,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "ICbxkpSF",
|
||||
H2PING: "7s7BbMyb",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 24392 * time.Second,
|
||||
DockerContainerID: "ZKXr68Yb",
|
||||
Shell: "CEfzx0Fo",
|
||||
|
@ -5620,7 +5620,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "MN3oA9D2",
|
||||
H2PING: "OV6Q2XEg",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 32718 * time.Second,
|
||||
DockerContainerID: "cU15LMet",
|
||||
Shell: "nEz9qz2l",
|
||||
|
@ -5638,6 +5638,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
Timeout: 4868 * time.Second,
|
||||
TTL: 11222 * time.Second,
|
||||
DeregisterCriticalServiceAfter: 68482 * time.Second,
|
||||
H2PingUseTLS: true,
|
||||
},
|
||||
},
|
||||
Connect: &structs.ServiceConnect{},
|
||||
|
@ -5764,7 +5765,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "bNnNfx2A",
|
||||
H2PING: "qC1pidiW",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 22224 * time.Second,
|
||||
DockerContainerID: "ipgdFtjd",
|
||||
Shell: "omVZq7Sz",
|
||||
|
@ -5789,7 +5790,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "FfvCwlqH",
|
||||
H2PING: "spI3muI3",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 12356 * time.Second,
|
||||
DockerContainerID: "HBndBU6R",
|
||||
Shell: "hVI33JjA",
|
||||
|
@ -5814,7 +5815,7 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||
OutputMaxSize: checks.DefaultBufSize,
|
||||
TCP: "fjiLFqVd",
|
||||
H2PING: "5NbNWhan",
|
||||
H2PINGDisableTLS: true,
|
||||
H2PingUseTLS: false,
|
||||
Interval: 23926 * time.Second,
|
||||
DockerContainerID: "dO5TtRHk",
|
||||
Shell: "e6q2ttES",
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
"GRPC": "",
|
||||
"GRPCUseTLS": false,
|
||||
"H2PING": "",
|
||||
"H2PINGDisableTLS": false,
|
||||
"H2PingUseTLS": false,
|
||||
"HTTP": "",
|
||||
"Header": {},
|
||||
"ID": "",
|
||||
|
@ -304,7 +304,7 @@
|
|||
"GRPC": "",
|
||||
"GRPCUseTLS": false,
|
||||
"H2PING": "",
|
||||
"H2PINGDisableTLS": false,
|
||||
"H2PingUseTLS": false,
|
||||
"HTTP": "",
|
||||
"Header": {},
|
||||
"Interval": "0s",
|
||||
|
@ -420,4 +420,4 @@
|
|||
"Version": "",
|
||||
"VersionPrerelease": "",
|
||||
"Watches": []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ check = {
|
|||
body = "5PBQd2OT"
|
||||
tcp = "JY6fTTcw"
|
||||
h2ping = "rQ8eyCSF"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "18714s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "qF66POS9"
|
||||
|
@ -138,7 +138,7 @@ checks = [
|
|||
body = "wSjTy7dg"
|
||||
tcp = "RJQND605"
|
||||
h2ping = "9N1cSb5B"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "22164s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "ipgdFtjd"
|
||||
|
@ -165,7 +165,7 @@ checks = [
|
|||
body = "0jkKgGUC"
|
||||
tcp = "4jG5casb"
|
||||
h2ping = "HCHU7gEb"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "28767s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "THW6u7rL"
|
||||
|
@ -383,7 +383,7 @@ service = {
|
|||
body = "wVVL2V6f"
|
||||
tcp = "fjiLFqVd"
|
||||
h2ping = "5NbNWhan"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "23926s"
|
||||
docker_container_id = "dO5TtRHk"
|
||||
shell = "e6q2ttES"
|
||||
|
@ -408,7 +408,7 @@ service = {
|
|||
body = "OwGjTFQi"
|
||||
tcp = "bNnNfx2A"
|
||||
h2ping = "qC1pidiW"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "22224s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "ipgdFtjd"
|
||||
|
@ -433,7 +433,7 @@ service = {
|
|||
body = "lUVLGYU7"
|
||||
tcp = "FfvCwlqH"
|
||||
h2ping = "spI3muI3"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "12356s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "HBndBU6R"
|
||||
|
@ -472,7 +472,7 @@ services = [
|
|||
body = "WeikigLh"
|
||||
tcp = "ICbxkpSF"
|
||||
h2ping = "7s7BbMyb"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "24392s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "ZKXr68Yb"
|
||||
|
@ -514,7 +514,7 @@ services = [
|
|||
body = "7CRjCJyz"
|
||||
tcp = "MN3oA9D2"
|
||||
h2ping = "OV6Q2XEg"
|
||||
h2ping_disable_tls = true
|
||||
h2ping_use_tls = false
|
||||
interval = "32718s"
|
||||
output_max_size = 4096
|
||||
docker_container_id = "cU15LMet"
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
"output_max_size": 4096,
|
||||
"tcp": "JY6fTTcw",
|
||||
"h2ping": "rQ8eyCSF",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "18714s",
|
||||
"docker_container_id": "qF66POS9",
|
||||
"shell": "sOnDy228",
|
||||
|
@ -139,7 +139,7 @@
|
|||
"body": "wSjTy7dg",
|
||||
"tcp": "RJQND605",
|
||||
"h2ping": "9N1cSb5B",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "22164s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "ipgdFtjd",
|
||||
|
@ -166,7 +166,7 @@
|
|||
"body": "0jkKgGUC",
|
||||
"tcp": "4jG5casb",
|
||||
"h2ping": "HCHU7gEb",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "28767s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "THW6u7rL",
|
||||
|
@ -379,7 +379,7 @@
|
|||
"body": "wVVL2V6f",
|
||||
"tcp": "fjiLFqVd",
|
||||
"h2ping": "5NbNWhan",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "23926s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "dO5TtRHk",
|
||||
|
@ -405,7 +405,7 @@
|
|||
"body": "OwGjTFQi",
|
||||
"tcp": "bNnNfx2A",
|
||||
"h2ping": "qC1pidiW",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "22224s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "ipgdFtjd",
|
||||
|
@ -430,7 +430,7 @@
|
|||
"body": "lUVLGYU7",
|
||||
"tcp": "FfvCwlqH",
|
||||
"h2ping": "spI3muI3",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "12356s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "HBndBU6R",
|
||||
|
@ -469,7 +469,7 @@
|
|||
"body": "WeikigLh",
|
||||
"tcp": "ICbxkpSF",
|
||||
"h2ping": "7s7BbMyb",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "24392s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "ZKXr68Yb",
|
||||
|
@ -511,7 +511,7 @@
|
|||
"body": "7CRjCJyz",
|
||||
"tcp": "MN3oA9D2",
|
||||
"h2ping": "OV6Q2XEg",
|
||||
"h2ping_disable_tls": true,
|
||||
"h2ping_use_tls": false,
|
||||
"interval": "32718s",
|
||||
"output_max_size": 4096,
|
||||
"docker_container_id": "cU15LMet",
|
||||
|
|
|
@ -285,7 +285,7 @@ var translateCheckTypeTCs = [][]translateKeyTestCase{
|
|||
translateDockerTCs,
|
||||
translateGRPCUseTLSTCs,
|
||||
translateTLSServerNameTCs,
|
||||
translateH2PINGDisableTLS,
|
||||
translateH2PingUseTLS,
|
||||
translateTLSSkipVerifyTCs,
|
||||
translateServiceIDTCs,
|
||||
}
|
||||
|
@ -678,59 +678,59 @@ var translateGRPCUseTLSTCs = []translateKeyTestCase{
|
|||
},
|
||||
}
|
||||
|
||||
func h2pingDisableTLSEqFn(out interface{}, want interface{}) error {
|
||||
func h2pingUseTLSEqFn(out interface{}, want interface{}) error {
|
||||
var got interface{}
|
||||
switch v := out.(type) {
|
||||
case structs.CheckDefinition:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
case *structs.CheckDefinition:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
case structs.CheckType:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
case *structs.CheckType:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
case structs.HealthCheckDefinition:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
case *structs.HealthCheckDefinition:
|
||||
got = v.H2PINGDisableTLS
|
||||
got = v.H2PingUseTLS
|
||||
default:
|
||||
panic(fmt.Sprintf("unexpected type %T", out))
|
||||
}
|
||||
if got != want {
|
||||
return fmt.Errorf("expected H2PINGDisableTLS to be %v, got %v", want, got)
|
||||
return fmt.Errorf("expected H2PingUseTLS to be %v, got %v", want, got)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var h2pingDisableTLSFields = []string{`"H2PINGDisableTLS": %s`, `"h2ping_disable_tls": %s`}
|
||||
var translateH2PINGDisableTLS = []translateKeyTestCase{
|
||||
var h2pingUseTLSFields = []string{`"H2PingUseTLS": %s`, `"h2ping_use_tls": %s`}
|
||||
var translateH2PingUseTLS = []translateKeyTestCase{
|
||||
{
|
||||
desc: "H2PINGDisableTLS: both set",
|
||||
in: []interface{}{"true", "false"},
|
||||
want: true,
|
||||
jsonFmtStr: "{" + strings.Join(h2pingDisableTLSFields, ",") + "}",
|
||||
equalityFn: h2pingDisableTLSEqFn,
|
||||
desc: "H2PingUseTLS: both set",
|
||||
in: []interface{}{"false", "true"},
|
||||
want: false,
|
||||
jsonFmtStr: "{" + strings.Join(h2pingUseTLSFields, ",") + "}",
|
||||
equalityFn: h2pingUseTLSEqFn,
|
||||
},
|
||||
{
|
||||
desc: "H2PINGDisableTLS:: first set",
|
||||
in: []interface{}{`true`},
|
||||
want: true,
|
||||
jsonFmtStr: "{" + h2pingDisableTLSFields[0] + "}",
|
||||
equalityFn: h2pingDisableTLSEqFn,
|
||||
desc: "H2PingUseTLS:: first set",
|
||||
in: []interface{}{`false`},
|
||||
want: false,
|
||||
jsonFmtStr: "{" + h2pingUseTLSFields[0] + "}",
|
||||
equalityFn: h2pingUseTLSEqFn,
|
||||
},
|
||||
{
|
||||
desc: "H2PINGDisableTLS: second set",
|
||||
in: []interface{}{`true`},
|
||||
want: true,
|
||||
jsonFmtStr: "{" + h2pingDisableTLSFields[1] + "}",
|
||||
equalityFn: h2pingDisableTLSEqFn,
|
||||
desc: "H2PingUseTLS: second set",
|
||||
in: []interface{}{`false`},
|
||||
want: false,
|
||||
jsonFmtStr: "{" + h2pingUseTLSFields[1] + "}",
|
||||
equalityFn: h2pingUseTLSEqFn,
|
||||
},
|
||||
{
|
||||
desc: "H2PINGDisableTLS: neither set",
|
||||
desc: "H2PingUseTLS: neither set",
|
||||
in: []interface{}{},
|
||||
want: false, // zero value
|
||||
want: true, // zero value
|
||||
jsonFmtStr: "{}",
|
||||
equalityFn: h2pingDisableTLSEqFn,
|
||||
equalityFn: h2pingUseTLSEqFn,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -993,7 +993,7 @@ func TestDecodeACLRoleWrite(t *testing.T) {
|
|||
// GRPC string
|
||||
// GRPCUseTLS bool
|
||||
// H2PING string
|
||||
// H2PINGDisableTLS bool
|
||||
// H2PingUseTLS bool
|
||||
// TLSServerName string
|
||||
// TLSSkipVerify bool
|
||||
// AliasNode string
|
||||
|
|
|
@ -25,7 +25,7 @@ type CheckDefinition struct {
|
|||
ScriptArgs []string
|
||||
HTTP string
|
||||
H2PING string
|
||||
H2PINGDisableTLS bool
|
||||
H2PingUseTLS bool
|
||||
Header map[string][]string
|
||||
Method string
|
||||
Body string
|
||||
|
@ -70,12 +70,15 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) {
|
|||
TLSSkipVerifySnake bool `json:"tls_skip_verify"`
|
||||
GRPCUseTLSSnake bool `json:"grpc_use_tls"`
|
||||
ServiceIDSnake string `json:"service_id"`
|
||||
H2PINGDisableTLSSnake bool `json:"h2ping_disable_tls"`
|
||||
H2PingUseTLSSnake bool `json:"h2ping_use_tls"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(t),
|
||||
}
|
||||
|
||||
aux.H2PingUseTLS = true
|
||||
aux.H2PingUseTLSSnake = true
|
||||
if err = lib.UnmarshalJSON(data, &aux); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -102,12 +105,12 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) {
|
|||
if aux.GRPCUseTLSSnake {
|
||||
t.GRPCUseTLS = aux.GRPCUseTLSSnake
|
||||
}
|
||||
if aux.H2PINGDisableTLSSnake {
|
||||
t.H2PINGDisableTLS = aux.H2PINGDisableTLSSnake
|
||||
}
|
||||
if t.ServiceID == "" {
|
||||
t.ServiceID = aux.ServiceIDSnake
|
||||
}
|
||||
if !aux.H2PingUseTLSSnake {
|
||||
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
||||
}
|
||||
|
||||
// Parse special values
|
||||
if aux.Interval != nil {
|
||||
|
@ -187,7 +190,7 @@ func (c *CheckDefinition) CheckType() *CheckType {
|
|||
AliasService: c.AliasService,
|
||||
HTTP: c.HTTP,
|
||||
H2PING: c.H2PING,
|
||||
H2PINGDisableTLS: c.H2PINGDisableTLS,
|
||||
H2PingUseTLS: c.H2PingUseTLS,
|
||||
GRPC: c.GRPC,
|
||||
GRPCUseTLS: c.GRPCUseTLS,
|
||||
Header: c.Header,
|
||||
|
|
|
@ -33,7 +33,7 @@ type CheckType struct {
|
|||
ScriptArgs []string
|
||||
HTTP string
|
||||
H2PING string
|
||||
H2PINGDisableTLS bool
|
||||
H2PingUseTLS bool
|
||||
Header map[string][]string
|
||||
Method string
|
||||
Body string
|
||||
|
@ -82,7 +82,7 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
|
|||
TLSServerNameSnake string `json:"tls_server_name"`
|
||||
TLSSkipVerifySnake bool `json:"tls_skip_verify"`
|
||||
GRPCUseTLSSnake bool `json:"grpc_use_tls"`
|
||||
H2PINGDisableTLSSnake bool `json:"h2ping_disable_tls"`
|
||||
H2PingUseTLSSnake bool `json:"h2ping_use_tls"`
|
||||
|
||||
// These are going to be ignored but since we are disallowing unknown fields
|
||||
// during parsing we have to be explicit about parsing but not using these.
|
||||
|
@ -93,6 +93,8 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
|
|||
}{
|
||||
Alias: (*Alias)(t),
|
||||
}
|
||||
aux.H2PingUseTLS = true
|
||||
aux.H2PingUseTLSSnake = true
|
||||
if err = lib.UnmarshalJSON(data, aux); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -117,10 +119,6 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
|
|||
if aux.GRPCUseTLSSnake {
|
||||
t.GRPCUseTLS = aux.GRPCUseTLSSnake
|
||||
}
|
||||
if aux.H2PINGDisableTLSSnake {
|
||||
t.H2PINGDisableTLS = aux.H2PINGDisableTLSSnake
|
||||
}
|
||||
|
||||
if aux.Interval != nil {
|
||||
switch v := aux.Interval.(type) {
|
||||
case string:
|
||||
|
@ -161,6 +159,9 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
|
|||
t.DeregisterCriticalServiceAfter = time.Duration(v)
|
||||
}
|
||||
}
|
||||
if !aux.H2PingUseTLSSnake {
|
||||
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
|
|
|
@ -1544,7 +1544,7 @@ type HealthCheckDefinition struct {
|
|||
Body string `json:",omitempty"`
|
||||
TCP string `json:",omitempty"`
|
||||
H2PING string `json:",omitempty"`
|
||||
H2PINGDisableTLS bool `json:",omitempty"`
|
||||
H2PingUseTLS bool `json:",omitempty"`
|
||||
Interval time.Duration `json:",omitempty"`
|
||||
OutputMaxSize uint `json:",omitempty"`
|
||||
Timeout time.Duration `json:",omitempty"`
|
||||
|
@ -1692,7 +1692,7 @@ func (c *HealthCheck) CheckType() *CheckType {
|
|||
Body: c.Definition.Body,
|
||||
TCP: c.Definition.TCP,
|
||||
H2PING: c.Definition.H2PING,
|
||||
H2PINGDisableTLS: c.Definition.H2PINGDisableTLS,
|
||||
H2PingUseTLS: c.Definition.H2PingUseTLS,
|
||||
Interval: c.Definition.Interval,
|
||||
DockerContainerID: c.Definition.DockerContainerID,
|
||||
Shell: c.Definition.Shell,
|
||||
|
|
|
@ -328,7 +328,7 @@ type AgentServiceCheck struct {
|
|||
GRPC string `json:",omitempty"`
|
||||
GRPCUseTLS bool `json:",omitempty"`
|
||||
H2PING string `json:",omitempty"`
|
||||
H2PINGDisableTLS bool `json:",omitempty"`
|
||||
H2PingUseTLS bool `json:",omitempty"`
|
||||
AliasNode string `json:",omitempty"`
|
||||
AliasService string `json:",omitempty"`
|
||||
SuccessBeforePassing int `json:",omitempty"`
|
||||
|
|
|
@ -13,7 +13,7 @@ func CheckTypeToStructs(s CheckType) structs.CheckType {
|
|||
t.ScriptArgs = s.ScriptArgs
|
||||
t.HTTP = s.HTTP
|
||||
t.H2PING = s.H2PING
|
||||
t.H2PINGDisableTLS = s.H2PINGDisableTLS
|
||||
t.H2PingUseTLS = s.H2PingUseTLS
|
||||
t.Header = MapHeadersToStructs(s.Header)
|
||||
t.Method = s.Method
|
||||
t.Body = s.Body
|
||||
|
@ -47,7 +47,7 @@ func NewCheckTypeFromStructs(t structs.CheckType) CheckType {
|
|||
s.ScriptArgs = t.ScriptArgs
|
||||
s.HTTP = t.HTTP
|
||||
s.H2PING = t.H2PING
|
||||
s.H2PINGDisableTLS = t.H2PINGDisableTLS
|
||||
s.H2PingUseTLS = t.H2PingUseTLS
|
||||
s.Header = NewMapHeadersFromStructs(t.Header)
|
||||
s.Method = t.Method
|
||||
s.Body = t.Body
|
||||
|
@ -122,7 +122,7 @@ func HealthCheckDefinitionToStructs(s HealthCheckDefinition) structs.HealthCheck
|
|||
t.Body = s.Body
|
||||
t.TCP = s.TCP
|
||||
t.H2PING = s.H2PING
|
||||
t.H2PINGDisableTLS = s.H2PINGDisableTLS
|
||||
t.H2PingUseTLS = s.H2PingUseTLS
|
||||
t.Interval = s.Interval
|
||||
t.OutputMaxSize = uint(s.OutputMaxSize)
|
||||
t.Timeout = s.Timeout
|
||||
|
@ -147,7 +147,7 @@ func NewHealthCheckDefinitionFromStructs(t structs.HealthCheckDefinition) Health
|
|||
s.Body = t.Body
|
||||
s.TCP = t.TCP
|
||||
s.H2PING = t.H2PING
|
||||
s.H2PINGDisableTLS = t.H2PINGDisableTLS
|
||||
s.H2PingUseTLS = t.H2PingUseTLS
|
||||
s.Interval = t.Interval
|
||||
s.OutputMaxSize = uint32(t.OutputMaxSize)
|
||||
s.Timeout = t.Timeout
|
||||
|
|
|
@ -153,7 +153,7 @@ type HealthCheckDefinition struct {
|
|||
DockerContainerID string `protobuf:"bytes,11,opt,name=DockerContainerID,proto3" json:"DockerContainerID,omitempty"`
|
||||
Shell string `protobuf:"bytes,12,opt,name=Shell,proto3" json:"Shell,omitempty"`
|
||||
H2PING string `protobuf:"bytes,20,opt,name=H2PING,proto3" json:"H2PING,omitempty"`
|
||||
H2PINGDisableTLS bool `protobuf:"varint,21,opt,name=H2PINGDisableTLS,proto3" json:"H2PINGDisableTLS,omitempty"`
|
||||
H2PingUseTLS bool `protobuf:"varint,21,opt,name=H2PingUseTLS,proto3" json:"H2PingUseTLS,omitempty"`
|
||||
GRPC string `protobuf:"bytes,13,opt,name=GRPC,proto3" json:"GRPC,omitempty"`
|
||||
GRPCUseTLS bool `protobuf:"varint,14,opt,name=GRPCUseTLS,proto3" json:"GRPCUseTLS,omitempty"`
|
||||
AliasNode string `protobuf:"bytes,15,opt,name=AliasNode,proto3" json:"AliasNode,omitempty"`
|
||||
|
@ -224,7 +224,7 @@ type CheckType struct {
|
|||
DockerContainerID string `protobuf:"bytes,12,opt,name=DockerContainerID,proto3" json:"DockerContainerID,omitempty"`
|
||||
Shell string `protobuf:"bytes,13,opt,name=Shell,proto3" json:"Shell,omitempty"`
|
||||
H2PING string `protobuf:"bytes,28,opt,name=H2PING,proto3" json:"H2PING,omitempty"`
|
||||
H2PINGDisableTLS bool `protobuf:"varint,30,opt,name=H2PINGDisableTLS,proto3" json:"H2PINGDisableTLS,omitempty"`
|
||||
H2PingUseTLS bool `protobuf:"varint,30,opt,name=H2PingUseTLS,proto3" json:"H2PingUseTLS,omitempty"`
|
||||
GRPC string `protobuf:"bytes,14,opt,name=GRPC,proto3" json:"GRPC,omitempty"`
|
||||
GRPCUseTLS bool `protobuf:"varint,15,opt,name=GRPCUseTLS,proto3" json:"GRPCUseTLS,omitempty"`
|
||||
TLSServerName string `protobuf:"bytes,27,opt,name=TLSServerName,proto3" json:"TLSServerName,omitempty"`
|
||||
|
@ -293,76 +293,76 @@ func init() {
|
|||
func init() { proto.RegisterFile("proto/pbservice/healthcheck.proto", fileDescriptor_8a6f7448747c9fbe) }
|
||||
|
||||
var fileDescriptor_8a6f7448747c9fbe = []byte{
|
||||
// 1100 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdd, 0x4e, 0xe3, 0x46,
|
||||
0x14, 0x8e, 0x09, 0x49, 0xc8, 0x04, 0x58, 0x98, 0x05, 0x3a, 0xcb, 0x6e, 0x4d, 0x4a, 0xf7, 0x82,
|
||||
0xb6, 0x34, 0x91, 0xe8, 0x8f, 0xda, 0x4a, 0x6d, 0x45, 0x08, 0x0b, 0xa9, 0x80, 0xa6, 0x4e, 0xba,
|
||||
0x95, 0x7a, 0x67, 0x9c, 0x49, 0x32, 0xc2, 0xf1, 0x44, 0xe3, 0x31, 0x22, 0x7d, 0x87, 0x4a, 0xbd,
|
||||
0xdc, 0x87, 0xe9, 0x03, 0x70, 0xc9, 0x65, 0xa5, 0x4a, 0xb4, 0x85, 0xb7, 0xe8, 0x55, 0x35, 0x67,
|
||||
0xec, 0x60, 0x6f, 0xbc, 0x0d, 0x5d, 0x6d, 0xaf, 0x72, 0x7e, 0x67, 0x3c, 0xe7, 0x9c, 0xef, 0x3b,
|
||||
0x0a, 0x7a, 0x67, 0x28, 0xb8, 0xe4, 0xd5, 0xe1, 0xa9, 0x4f, 0xc5, 0x39, 0x73, 0x68, 0xb5, 0x4f,
|
||||
0x6d, 0x57, 0xf6, 0x9d, 0x3e, 0x75, 0xce, 0x2a, 0xe0, 0xc3, 0xc5, 0xb1, 0x73, 0xdd, 0xec, 0x71,
|
||||
0xde, 0x73, 0x69, 0x15, 0x1c, 0xa7, 0x41, 0xb7, 0xda, 0x09, 0x84, 0x2d, 0x19, 0xf7, 0x74, 0xe8,
|
||||
0xfa, 0xe3, 0xe8, 0x34, 0x87, 0x0f, 0x06, 0xdc, 0xab, 0xea, 0x9f, 0xd0, 0xb9, 0xd2, 0xe3, 0x3d,
|
||||
0xae, 0x03, 0x94, 0xa4, 0xad, 0x9b, 0xbf, 0xcf, 0xa2, 0xd2, 0x21, 0xdc, 0xb9, 0xa7, 0xee, 0xc4,
|
||||
0x18, 0xcd, 0x9e, 0xf0, 0x0e, 0x25, 0x46, 0xd9, 0xd8, 0x2a, 0x5a, 0x20, 0xe3, 0x03, 0x54, 0x00,
|
||||
0x67, 0xa3, 0x4e, 0x66, 0x94, 0xb9, 0xf6, 0xe1, 0xdf, 0xd7, 0x1b, 0xef, 0xf5, 0x98, 0xec, 0x07,
|
||||
0xa7, 0x15, 0x87, 0x0f, 0xaa, 0x7d, 0xdb, 0xef, 0x33, 0x87, 0x8b, 0x61, 0xd5, 0xe1, 0x9e, 0x1f,
|
||||
0xb8, 0x55, 0x39, 0x1a, 0x52, 0xbf, 0x12, 0x26, 0x59, 0x51, 0x36, 0x1c, 0x6e, 0x0f, 0x28, 0xc9,
|
||||
0x86, 0x87, 0xdb, 0x03, 0x8a, 0xd7, 0x50, 0xbe, 0x25, 0x6d, 0x19, 0xf8, 0x64, 0x16, 0xac, 0xa1,
|
||||
0x86, 0x57, 0x50, 0xee, 0x84, 0x4b, 0xea, 0x93, 0x1c, 0x98, 0xb5, 0xa2, 0xa2, 0xbf, 0x0d, 0xe4,
|
||||
0x30, 0x90, 0x24, 0xaf, 0xa3, 0xb5, 0x86, 0x9f, 0xa0, 0x62, 0x4b, 0x17, 0xa9, 0x51, 0x27, 0x05,
|
||||
0x70, 0xdd, 0x19, 0x70, 0x19, 0x95, 0x42, 0x05, 0xae, 0x9f, 0x03, 0x7f, 0xdc, 0x14, 0x8b, 0x68,
|
||||
0xdb, 0x3d, 0x9f, 0x14, 0xcb, 0xd9, 0x58, 0x84, 0x32, 0xa9, 0x6f, 0x6f, 0x8f, 0x86, 0x94, 0xcc,
|
||||
0xeb, 0x6f, 0x57, 0x32, 0x7e, 0x86, 0x50, 0x9d, 0x76, 0x99, 0xc7, 0x54, 0x0f, 0x08, 0x2a, 0x1b,
|
||||
0x5b, 0xa5, 0x9d, 0x72, 0x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||||
0x98, 0x11, 0x56, 0x80, 0x11, 0xe2, 0x6c, 0x3e, 0x7e, 0xe4, 0xbd, 0x58, 0xa0, 0x90, 0xca, 0x02,
|
||||
0xeb, 0x93, 0x2c, 0x30, 0x97, 0xce, 0x02, 0xc5, 0xd7, 0x61, 0x81, 0xc4, 0x5c, 0xa1, 0x69, 0x73,
|
||||
0x55, 0x4a, 0x99, 0xab, 0x54, 0x54, 0xcd, 0x4f, 0x45, 0xd5, 0x42, 0x3a, 0xaa, 0x9e, 0x4c, 0x45,
|
||||
0x95, 0x39, 0x05, 0x55, 0x8b, 0xaf, 0x44, 0xd5, 0x83, 0x09, 0x54, 0x4d, 0xac, 0x86, 0xc7, 0xf7,
|
||||
0x5a, 0x0d, 0x4b, 0x69, 0xab, 0x21, 0xc6, 0x94, 0xcb, 0xaf, 0xc1, 0x94, 0x21, 0x3c, 0xf1, 0x7f,
|
||||
0x83, 0x27, 0xde, 0x41, 0x2b, 0xad, 0xc0, 0x71, 0xa8, 0xef, 0xd7, 0x68, 0x97, 0x0b, 0xda, 0xb4,
|
||||
0x7d, 0x9f, 0x79, 0x3d, 0xe0, 0x9e, 0x9c, 0x95, 0xea, 0xc3, 0x1f, 0xa3, 0xd5, 0x67, 0x36, 0x73,
|
||||
0x03, 0x41, 0x43, 0xc7, 0x0f, 0xb6, 0xf0, 0x54, 0xd2, 0xdb, 0x90, 0x94, 0xee, 0xc4, 0x9f, 0xa2,
|
||||
0xb5, 0xa4, 0x23, 0xe2, 0x60, 0xb2, 0x06, 0x69, 0xaf, 0xf0, 0xaa, 0x09, 0x6b, 0x0a, 0x7e, 0x31,
|
||||
0x02, 0xe4, 0xbc, 0xa5, 0x27, 0x6c, 0x6c, 0x18, 0x7b, 0xa1, 0x75, 0x24, 0xe6, 0x85, 0xfe, 0x4d,
|
||||
0x5f, 0x1f, 0x0f, 0xdf, 0xdc, 0xfa, 0x98, 0x58, 0x88, 0x8f, 0xe0, 0x5d, 0x49, 0xe3, 0xff, 0xc0,
|
||||
0x87, 0xb5, 0xe3, 0xcb, 0xbf, 0xcc, 0xcc, 0xe5, 0x8d, 0x69, 0x5c, 0xdd, 0x98, 0xc6, 0x9f, 0x37,
|
||||
0xa6, 0xf1, 0xcb, 0xad, 0x99, 0x79, 0x71, 0x6b, 0x66, 0xae, 0x6e, 0xcd, 0xcc, 0x6f, 0xb7, 0x66,
|
||||
0xe6, 0xc7, 0x0f, 0xfe, 0x8d, 0x0e, 0x5f, 0xfa, 0x43, 0x70, 0x9a, 0x07, 0xc3, 0x47, 0xff, 0x04,
|
||||
0x00, 0x00, 0xff, 0xff, 0xb7, 0x54, 0xd1, 0x6f, 0x2a, 0x0c, 0x00, 0x00,
|
||||
// 1098 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x4f, 0xe3, 0x46,
|
||||
0x14, 0x8f, 0x09, 0x49, 0xc8, 0x64, 0x61, 0x61, 0x16, 0xe8, 0x2c, 0xbb, 0x35, 0x29, 0xdd, 0x03,
|
||||
0x55, 0x69, 0x22, 0xd1, 0x3f, 0x6a, 0x2b, 0xb5, 0x15, 0x21, 0x2c, 0xa4, 0x02, 0x9a, 0x3a, 0xe9,
|
||||
0x56, 0xea, 0xcd, 0x38, 0x93, 0xc4, 0x22, 0xf1, 0x58, 0xe3, 0x31, 0x22, 0xbd, 0xf7, 0xde, 0xe3,
|
||||
0x7e, 0x90, 0x7e, 0x08, 0x8e, 0x1c, 0x2b, 0x55, 0xa2, 0x2d, 0x7c, 0x8b, 0x9e, 0xaa, 0x79, 0x33,
|
||||
0x0e, 0xf6, 0xc6, 0x0b, 0xe9, 0x6a, 0x7b, 0xca, 0xbc, 0xf7, 0x7b, 0x6f, 0xc6, 0x33, 0xef, 0xf7,
|
||||
0x7b, 0x4f, 0x41, 0xef, 0xf9, 0x9c, 0x09, 0x56, 0xf5, 0x4f, 0x02, 0xca, 0xcf, 0x5c, 0x87, 0x56,
|
||||
0xfb, 0xd4, 0x1e, 0x88, 0xbe, 0xd3, 0xa7, 0xce, 0x69, 0x05, 0x30, 0x5c, 0x1c, 0x83, 0x6b, 0x66,
|
||||
0x8f, 0xb1, 0xde, 0x80, 0x56, 0x01, 0x38, 0x09, 0xbb, 0xd5, 0x4e, 0xc8, 0x6d, 0xe1, 0x32, 0x4f,
|
||||
0x85, 0xae, 0x3d, 0x89, 0x76, 0x73, 0xd8, 0x70, 0xc8, 0xbc, 0xaa, 0xfa, 0xd1, 0xe0, 0x72, 0x8f,
|
||||
0xf5, 0x98, 0x0a, 0x90, 0x2b, 0xe5, 0xdd, 0xf8, 0x63, 0x16, 0x95, 0x0e, 0xe0, 0xcc, 0x5d, 0x79,
|
||||
0x26, 0xc6, 0x68, 0xf6, 0x98, 0x75, 0x28, 0x31, 0xca, 0xc6, 0x66, 0xd1, 0x82, 0x35, 0xde, 0x47,
|
||||
0x05, 0x00, 0x1b, 0x75, 0x32, 0x23, 0xdd, 0xb5, 0x8f, 0xfe, 0xb9, 0x5a, 0xff, 0xa0, 0xe7, 0x8a,
|
||||
0x7e, 0x78, 0x52, 0x71, 0xd8, 0xb0, 0xda, 0xb7, 0x83, 0xbe, 0xeb, 0x30, 0xee, 0x57, 0x1d, 0xe6,
|
||||
0x05, 0xe1, 0xa0, 0x2a, 0x46, 0x3e, 0x0d, 0x2a, 0x3a, 0xc9, 0x8a, 0xb2, 0x61, 0x73, 0x7b, 0x48,
|
||||
0x49, 0x56, 0x6f, 0x6e, 0x0f, 0x29, 0x5e, 0x45, 0xf9, 0x96, 0xb0, 0x45, 0x18, 0x90, 0x59, 0xf0,
|
||||
0x6a, 0x0b, 0x2f, 0xa3, 0xdc, 0x31, 0x13, 0x34, 0x20, 0x39, 0x70, 0x2b, 0x43, 0x46, 0x7f, 0x17,
|
||||
0x0a, 0x3f, 0x14, 0x24, 0xaf, 0xa2, 0x95, 0x85, 0x9f, 0xa2, 0x62, 0x4b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, 0x40, 0xae, 0x0e, 0xe5, 0x2f, 0xec,
|
||||
0x41, 0x48, 0x65, 0x4d, 0x61, 0x41, 0x0c, 0x78, 0x5f, 0x65, 0x6c, 0xfc, 0x56, 0x40, 0x2b, 0xa9,
|
||||
0x2f, 0x25, 0xdf, 0xfc, 0xa0, 0xdd, 0x6e, 0x46, 0x64, 0x94, 0x6b, 0xfc, 0x0c, 0xcd, 0xb7, 0x0f,
|
||||
0x5b, 0xb2, 0x32, 0x94, 0x43, 0x35, 0x1f, 0x01, 0x98, 0x74, 0x46, 0x51, 0xa7, 0xae, 0xff, 0x82,
|
||||
0x72, 0xb7, 0x3b, 0x02, 0xe2, 0xce, 0x59, 0x49, 0x27, 0xfe, 0x16, 0xe5, 0xd5, 0xe7, 0x91, 0x6c,
|
||||
0x39, 0xbb, 0x59, 0xda, 0xde, 0xba, 0xaf, 0x76, 0x15, 0x15, 0xbe, 0xe7, 0x09, 0x3e, 0xd2, 0x4f,
|
||||
0xa9, 0x77, 0x90, 0xcc, 0x3c, 0xa2, 0xa2, 0xcf, 0x3a, 0x11, 0x8f, 0x95, 0x25, 0xef, 0x50, 0x63,
|
||||
0x9d, 0x11, 0xc1, 0xea, 0x0e, 0x72, 0x8d, 0x17, 0x51, 0xb6, 0xbd, 0xdb, 0xd4, 0xcc, 0x96, 0x4b,
|
||||
0xfc, 0x4d, 0xec, 0x79, 0xf3, 0x50, 0xc0, 0xc7, 0x15, 0x25, 0xf6, 0x4a, 0x24, 0xf6, 0x4a, 0x5d,
|
||||
0x8b, 0x5d, 0x11, 0xe1, 0xe5, 0x9f, 0xeb, 0x46, 0xac, 0x06, 0xcf, 0xd0, 0xbc, 0x92, 0xc2, 0x91,
|
||||
0x7d, 0xde, 0x72, 0x7f, 0xa6, 0xa4, 0x58, 0x36, 0x36, 0xe7, 0xad, 0xa4, 0x13, 0x7f, 0x75, 0x5b,
|
||||
0xa9, 0xc2, 0xf4, 0xa7, 0x44, 0x39, 0xf8, 0x14, 0x99, 0x75, 0xca, 0x69, 0xcf, 0x0d, 0x04, 0xe5,
|
||||
0xbb, 0xdc, 0x15, 0xae, 0x63, 0x0f, 0xb4, 0x48, 0x76, 0xba, 0x82, 0x72, 0x90, 0xd6, 0x94, 0xbb,
|
||||
0xde, 0xb3, 0x15, 0x36, 0x11, 0x6a, 0x39, 0xdc, 0xf5, 0xc5, 0x0e, 0xef, 0x05, 0x04, 0x01, 0x63,
|
||||
0x62, 0x1e, 0xbc, 0x85, 0x96, 0xea, 0xcc, 0x39, 0xa5, 0x7c, 0x97, 0x79, 0xc2, 0x76, 0x3d, 0xca,
|
||||
0x1b, 0x75, 0x10, 0x4f, 0xd1, 0x9a, 0x04, 0x24, 0xf5, 0x5a, 0x7d, 0x3a, 0x18, 0x68, 0xfd, 0x2a,
|
||||
0x43, 0x16, 0xed, 0x60, 0xbb, 0xd9, 0x38, 0xde, 0x27, 0xcb, 0xaa, 0x68, 0xca, 0xc2, 0x1b, 0xe8,
|
||||
0xc1, 0xc1, 0x76, 0xd3, 0xf5, 0x7a, 0x3f, 0x04, 0xb4, 0x7d, 0xd8, 0x22, 0x2b, 0xc0, 0x9e, 0x84,
|
||||
0x4f, 0x16, 0x76, 0xdf, 0x6a, 0xee, 0x82, 0xde, 0x8a, 0x16, 0xac, 0xe5, 0x37, 0xcb, 0x5f, 0x9d,
|
||||
0xb5, 0x00, 0x59, 0x31, 0x8f, 0x6c, 0x53, 0x3b, 0x03, 0xd7, 0x0e, 0xa0, 0xc5, 0x2a, 0x19, 0xdd,
|
||||
0x3a, 0xe4, 0xa9, 0x60, 0xe8, 0x67, 0xd0, 0x62, 0x4a, 0xf8, 0xf0, 0xa7, 0x28, 0xdb, 0x6e, 0x1f,
|
||||
0x92, 0xa5, 0xe9, 0xdf, 0x59, 0xc6, 0xaf, 0x7d, 0x1f, 0x09, 0x11, 0xa8, 0x2b, 0x09, 0x78, 0x4a,
|
||||
0x47, 0x5a, 0x57, 0x72, 0x89, 0xb7, 0x50, 0xee, 0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0x64, 0xd2, 0xbb, 0x90, 0x94, 0x0e, 0xe2, 0xcf, 0xd0, 0x6a,
|
||||
0x12, 0x88, 0x7a, 0x2e, 0x59, 0x85, 0xb4, 0xd7, 0xa0, 0x92, 0x59, 0x4d, 0xce, 0xce, 0x47, 0xa0,
|
||||
0x98, 0x77, 0x14, 0xb3, 0xc6, 0x8e, 0x31, 0x0a, 0xa5, 0x23, 0x31, 0x14, 0xea, 0x77, 0xff, 0xb8,
|
||||
0x78, 0xf4, 0xf6, 0xc6, 0xc5, 0xc4, 0x00, 0x7c, 0x0c, 0xf7, 0x4a, 0x3a, 0xff, 0x87, 0x3e, 0x58,
|
||||
0x3b, 0xba, 0xf8, 0xdb, 0xcc, 0x5c, 0x5c, 0x9b, 0xc6, 0xe5, 0xb5, 0x69, 0xfc, 0x75, 0x6d, 0x1a,
|
||||
0xbf, 0xde, 0x98, 0x99, 0x97, 0x37, 0x66, 0xe6, 0xf2, 0xc6, 0xcc, 0xfc, 0x7e, 0x63, 0x66, 0x7e,
|
||||
0xfa, 0xf0, 0xae, 0x36, 0xf8, 0xca, 0x1f, 0x80, 0x93, 0x3c, 0x38, 0x3e, 0xfe, 0x37, 0x00, 0x00,
|
||||
0xff, 0xff, 0xd0, 0xae, 0x76, 0xe3, 0x1a, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *HealthCheck) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -563,9 +563,9 @@ func (m *HealthCheckDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
i--
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
|
@ -775,9 +775,9 @@ func (m *CheckType) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
i--
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
|
@ -1218,7 +1218,7 @@ func (m *HealthCheckDefinition) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 2 + l + sovHealthcheck(uint64(l))
|
||||
}
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
n += 3
|
||||
}
|
||||
return n
|
||||
|
@ -1339,7 +1339,7 @@ func (m *CheckType) Size() (n int) {
|
|||
if m.FailuresBeforeWarning != 0 {
|
||||
n += 2 + sovHealthcheck(uint64(m.FailuresBeforeWarning))
|
||||
}
|
||||
if m.H2PINGDisableTLS {
|
||||
if m.H2PingUseTLS {
|
||||
n += 3
|
||||
}
|
||||
return n
|
||||
|
@ -2726,7 +2726,7 @@ func (m *HealthCheckDefinition) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 21:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field H2PINGDisableTLS", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field H2PingUseTLS", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2743,7 +2743,7 @@ func (m *HealthCheckDefinition) Unmarshal(dAtA []byte) error {
|
|||
break
|
||||
}
|
||||
}
|
||||
m.H2PINGDisableTLS = bool(v != 0)
|
||||
m.H2PingUseTLS = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipHealthcheck(dAtA[iNdEx:])
|
||||
|
@ -3752,7 +3752,7 @@ func (m *CheckType) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
case 30:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field H2PINGDisableTLS", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field H2PingUseTLS", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3769,7 +3769,7 @@ func (m *CheckType) Unmarshal(dAtA []byte) error {
|
|||
break
|
||||
}
|
||||
}
|
||||
m.H2PINGDisableTLS = bool(v != 0)
|
||||
m.H2PingUseTLS = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipHealthcheck(dAtA[iNdEx:])
|
||||
|
|
|
@ -83,7 +83,7 @@ message HealthCheckDefinition {
|
|||
string DockerContainerID = 11;
|
||||
string Shell = 12;
|
||||
string H2PING = 20;
|
||||
bool H2PINGDisableTLS = 21;
|
||||
bool H2PingUseTLS = 21;
|
||||
string GRPC = 13;
|
||||
bool GRPCUseTLS = 14;
|
||||
string AliasNode = 15;
|
||||
|
@ -125,7 +125,7 @@ message CheckType {
|
|||
string DockerContainerID = 12;
|
||||
string Shell = 13;
|
||||
string H2PING = 28;
|
||||
bool H2PINGDisableTLS = 30;
|
||||
bool H2PingUseTLS = 30;
|
||||
string GRPC = 14;
|
||||
bool GRPCUseTLS = 15;
|
||||
string TLSServerName = 27;
|
||||
|
|
|
@ -186,7 +186,7 @@ The table below shows this endpoint's support for
|
|||
- `H2PING` `(string "")` - Specifies an address that uses http2 to run a ping check on.
|
||||
At the specified `Interval`, a connection is made to the address, and a ping is sent.
|
||||
If the ping is successful, the check will be classified as `passing`, otherwise it will be marked as `critical`.
|
||||
TLS is used by default. To disable TLS and use h2c, set `H2PINGDisableTLS` to `true`.
|
||||
TLS is used by default. To disable TLS and use h2c, set `H2PINGUseTLS` to `false`.
|
||||
If TLS is enabled, a valid SSL certificate is required by default, but verification can be removed with `TLSSkipVerify`.
|
||||
|
||||
- `HTTP` `(string: "")` - Specifies an `HTTP` check to perform a `GET` request
|
||||
|
|
|
@ -122,7 +122,7 @@ There are several different kinds of checks:
|
|||
|
||||
- `H2ping + Interval` - These checks test an endpoint that uses http2
|
||||
by connecting to the endpoint and sending a ping frame. TLS is assumed to be configured by default.
|
||||
To disable TLS and use h2c, set `h2ping_disable_tls` to `true`. If the ping is successful
|
||||
To disable TLS and use h2c, set `h2ping_enable_tls` to `false`. If the ping is successful
|
||||
within a specified timeout, then the check is updated as passing.
|
||||
The timeout defaults to 10 seconds, but is configurable using the `timeout` field. If TLS is enabled a valid
|
||||
certificate is required, unless `tls_skip_verify` is set to `true`.
|
||||
|
@ -252,7 +252,7 @@ A h2ping check:
|
|||
"name": "h2ping",
|
||||
"h2ping": "localhost:22222",
|
||||
"interval": "10s",
|
||||
"h2ping_disable_tls": false
|
||||
"h2ping_use_tls": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue