Skip to content

Commit

Permalink
Added delaySeconds field to healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
cihangirbesiktas authored and Luis Davim committed Aug 9, 2017
1 parent 1c72a8e commit 14a962b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
2 changes: 2 additions & 0 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type HealthCheck struct {
GracePeriodSeconds int `json:"gracePeriodSeconds,omitempty"`
IntervalSeconds int `json:"intervalSeconds,omitempty"`
TimeoutSeconds int `json:"timeoutSeconds,omitempty"`
DelaySeconds int `json:"delaySeconds,omitempty"`
IgnoreHTTP1xx *bool `json:"ignoreHttp1xx,omitempty"`
}

Expand Down Expand Up @@ -80,6 +81,7 @@ func NewDefaultHealthCheck() *HealthCheck {
GracePeriodSeconds: 30,
IntervalSeconds: 10,
TimeoutSeconds: 5,
DelaySeconds: 15,
}
}

Expand Down
3 changes: 2 additions & 1 deletion tests/app-definitions/TestApplicationString-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"protocol": "HTTP",
"gracePeriodSeconds": 30,
"intervalSeconds": 5,
"timeoutSeconds": 5
"timeoutSeconds": 5,
"delaySeconds": 15
}
],
"instances": 2,
Expand Down
36 changes: 24 additions & 12 deletions tests/rest-api/methods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 5
"timeoutSeconds": 5,
"delaySeconds": 15
}
],
"id": "/fake-app",
Expand Down Expand Up @@ -117,7 +118,8 @@
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
"timeoutSeconds": 20,
"delaySeconds": 15
}
],
"id": "/fake-app",
Expand Down Expand Up @@ -180,7 +182,8 @@
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
"timeoutSeconds": 20,
"delaySeconds": 15
}
],
"id": "/fake-app-broken",
Expand Down Expand Up @@ -324,7 +327,8 @@
"path": "/health",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 10
"timeoutSeconds": 10,
"delaySeconds": 15
}
],
"id": "/fake-app",
Expand Down Expand Up @@ -440,7 +444,8 @@
"path": "/health",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 10
"timeoutSeconds": 10,
"delaySeconds": 15
}
],
"id": "/fake-app",
Expand Down Expand Up @@ -569,7 +574,8 @@
"path": "/health",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 10
"timeoutSeconds": 10,
"delaySeconds": 15
}
],
"id": "/fake-app-broken",
Expand Down Expand Up @@ -793,7 +799,8 @@
"intervalSeconds": 10,
"portIndex": 0,
"timeoutSeconds": 10,
"maxConsecutiveFailures": 3
"maxConsecutiveFailures": 3,
"delaySeconds": 15
}
],
"id": "apache",
Expand Down Expand Up @@ -830,7 +837,8 @@
"gracePeriodSeconds": 10,
"intervalSeconds": 10,
"timeoutSeconds": 5,
"maxConsecutiveFailures": 2
"maxConsecutiveFailures": 2,
"delaySeconds": 15
}
],
"id": "mysql",
Expand Down Expand Up @@ -867,7 +875,8 @@
"gracePeriodSeconds": 10,
"intervalSeconds": 10,
"timeoutSeconds": 5,
"maxConsecutiveFailures": 2
"maxConsecutiveFailures": 2,
"delaySeconds": 15
}
],
"id": "caching",
Expand Down Expand Up @@ -1227,7 +1236,8 @@
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
"timeoutSeconds": 20,
"delaySeconds": 15
}
],
"id": "/fake-app",
Expand Down Expand Up @@ -1290,7 +1300,8 @@
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
"timeoutSeconds": 20,
"delaySeconds": 15
}
],
"id": "/fake-app-broken",
Expand Down Expand Up @@ -1327,7 +1338,8 @@
"path": "/health",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 10
"timeoutSeconds": 10,
"delaySeconds": 15
}
],
"id": "/no-health-check-results-app",
Expand Down

0 comments on commit 14a962b

Please sign in to comment.