1
0
Fork 0

Add health check label to ECS

This commit is contained in:
Tait Clarridge 2017-11-21 05:06:03 -05:00 committed by Traefiker
parent 4b91204686
commit 6d2f4a0813
7 changed files with 111 additions and 26 deletions

View file

@ -28,10 +28,11 @@ func GetHealthCheck() *HealthCheck {
// Options are the public health check options.
type Options struct {
Path string
Port int
Interval time.Duration
LB LoadBalancer
Path string
Port int
Transport http.RoundTripper
Interval time.Duration
LB LoadBalancer
}
func (opt Options) String() string {
@ -146,7 +147,8 @@ func (backend *BackendHealthCheck) newRequest(serverURL *url.URL) (*http.Request
func checkHealth(serverURL *url.URL, backend *BackendHealthCheck) bool {
client := http.Client{
Timeout: backend.requestTimeout,
Timeout: backend.requestTimeout,
Transport: backend.Options.Transport,
}
req, err := backend.newRequest(serverURL)
if err != nil {