Пример #1
0
func attributeMatch(slaveConstraints []eremetic.SlaveConstraint) ogle.Matcher {
	var submatchers []ogle.Matcher
	for _, constraint := range slaveConstraints {
		submatchers = append(submatchers, &attributeMatcher{constraint})
	}
	return ogle.AllOf(submatchers...)
}
Пример #2
0
func createMatcher(task eremetic.Task) ogle.Matcher {
	return ogle.AllOf(
		cpuAvailable(task.TaskCPUs),
		memoryAvailable(task.TaskMem),
		attributeMatch(task.SlaveConstraints),
	)
}
Пример #3
0
func createMatcher(task types.EremeticTask) ogle.Matcher {
	return ogle.AllOf(
		CPUAvailable(task.TaskCPUs),
		MemoryAvailable(task.TaskMem))
}