refactor: some minor changes.
This commit is contained in:
parent
529e34d2ae
commit
b9d8eff994
9 changed files with 24 additions and 76 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue