Marathon constraints filtering
This commit is contained in:
parent
7ddefcef72
commit
4b91204686
4 changed files with 65 additions and 20 deletions
|
@ -44,6 +44,12 @@ func label(key, value string) func(*marathon.Application) {
|
|||
}
|
||||
}
|
||||
|
||||
func constraint(value string) func(*marathon.Application) {
|
||||
return func(app *marathon.Application) {
|
||||
app.AddConstraint(strings.Split(value, ":")...)
|
||||
}
|
||||
}
|
||||
|
||||
func labelWithService(key, value string, serviceName string) func(*marathon.Application) {
|
||||
if len(serviceName) == 0 {
|
||||
panic("serviceName can not be empty")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue