From d56936e27a233cf68f6df8af08f11d9df168ca41 Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Mon, 23 Oct 2017 17:44:32 -0700 Subject: [PATCH] Added remaining HTTP health check fields to structs --- agent/structs/structs.go | 11 +++++++---- api/agent.go | 27 +++++++++++++++------------ api/health.go | 11 +++++++---- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/agent/structs/structs.go b/agent/structs/structs.go index cf8961f8bc..a837c5277d 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -482,10 +482,13 @@ type HealthCheck struct { ServiceName string // optional service name ServiceTags []string // optional service tags - HTTP string `json:",omitempty"` - TCP string `json:",omitempty"` - Interval string `json:",omitempty"` - Timeout string `json:",omitempty"` + HTTP string `json:",omitempty"` + TLSSkipVerify bool `json:",omitempty"` + Header map[string][]string `json:",omitempty"` + Method string `json:",omitempty"` + TCP string `json:",omitempty"` + Interval string `json:",omitempty"` + Timeout string `json:",omitempty"` RaftIndex } diff --git a/api/agent.go b/api/agent.go index a53ab386eb..53e600aedd 100644 --- a/api/agent.go +++ b/api/agent.go @@ -7,18 +7,21 @@ import ( // AgentCheck represents a check known to the agent type AgentCheck struct { - Node string - CheckID string - Name string - Status string - Notes string - Output string - ServiceID string - ServiceName string - HTTP string - TCP string - Interval string - Timeout string + Node string + CheckID string + Name string + Status string + Notes string + Output string + ServiceID string + ServiceName string + HTTP string + Header map[string][]string + Method string + TLSSkipVerify bool + TCP string + Interval string + Timeout string } // AgentService represents a service known to the agent diff --git a/api/health.go b/api/health.go index ebdd2a47d7..b5503fb2e9 100644 --- a/api/health.go +++ b/api/health.go @@ -35,10 +35,13 @@ type HealthCheck struct { ServiceName string ServiceTags []string - HTTP string - TCP string - Interval string - Timeout string + HTTP string + Header map[string][]string + Method string + TLSSkipVerify bool + TCP string + Interval string + Timeout string } // HealthChecks is a collection of HealthCheck structs.