1
0
Fork 0

refactor: some minor changes.

This commit is contained in:
Fernandez Ludovic 2018-02-19 01:04:45 +01:00 committed by Traefiker Bot
parent 529e34d2ae
commit b9d8eff994
9 changed files with 24 additions and 76 deletions

View file

@ -61,14 +61,6 @@ func withServiceLabel(key, value string, serviceName string) func(*marathon.Appl
}
}
func healthChecks(checks ...*marathon.HealthCheck) func(*marathon.Application) {
return func(app *marathon.Application) {
for _, check := range checks {
app.AddHealthCheck(*check)
}
}
}
func portDefinition(port int) func(*marathon.Application) {
return func(app *marathon.Application) {
app.AddPortDefinition(marathon.PortDefinition{
@ -194,16 +186,6 @@ func state(s TaskState) func(*marathon.Task) {
}
}
func healthCheckResultLiveness(alive ...bool) func(*marathon.Task) {
return func(t *marathon.Task) {
for _, a := range alive {
t.HealthCheckResults = append(t.HealthCheckResults, &marathon.HealthCheckResult{
Alive: a,
})
}
}
}
func startedAt(timestamp string) func(*marathon.Task) {
return func(t *marathon.Task) {
t.StartedAt = timestamp