This repository has been archived on 2024-04-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elektron/schedulers/helpers.go

27 lines
455 B
Go
Raw Normal View History

package schedulers
import (
"bitbucket.org/sunybingcloud/elektron/constants"
"fmt"
"log"
)
func coLocated(tasks map[string]bool) {
for task := range tasks {
log.Println(task)
}
fmt.Println("---------------------")
}
// Get the powerClass of the given hostname
func hostToPowerClass(hostName string) string {
for powerClass, hosts := range constants.PowerClasses {
if _, ok := hosts[hostName]; ok {
return powerClass
}
}
return ""
}