1
0
Fork 0

Adding compatibility for marathon 1.5

This commit is contained in:
Trevin Teacutter 2018-07-03 16:42:03 -05:00 committed by Traefiker Bot
parent 461ebf6d88
commit 04d8b5d483
35 changed files with 2257 additions and 63 deletions

View file

@ -30,6 +30,35 @@ type HealthCheck struct {
IgnoreHTTP1xx *bool `json:"ignoreHttp1xx,omitempty"`
}
// HTTPHealthCheck describes an HTTP based health check
type HTTPHealthCheck struct {
Endpoint string `json:"endpoint,omitempty"`
Path string `json:"path,omitempty"`
Scheme string `json:"scheme,omitempty"`
}
// TCPHealthCheck describes a TCP based health check
type TCPHealthCheck struct {
Endpoint string `json:"endpoint,omitempty"`
}
// CommandHealthCheck describes a shell-based health check
type CommandHealthCheck struct {
Command PodCommand `json:"command,omitempty"`
}
// PodHealthCheck describes how to determine a pod's health
type PodHealthCheck struct {
HTTP *HTTPHealthCheck `json:"http,omitempty"`
TCP *TCPHealthCheck `json:"tcp,omitempty"`
Exec *CommandHealthCheck `json:"exec,omitempty"`
GracePeriodSeconds *int `json:"gracePeriodSeconds,omitempty"`
IntervalSeconds *int `json:"intervalSeconds,omitempty"`
MaxConsecutiveFailures *int `json:"maxConsecutiveFailures,omitempty"`
TimeoutSeconds *int `json:"timeoutSeconds,omitempty"`
DelaySeconds *int `json:"delaySeconds,omitempty"`
}
// SetCommand sets the given command on the health check.
func (h *HealthCheck) SetCommand(c Command) *HealthCheck {
h.Command = &c