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
452 B
Go
Raw Normal View History

package schedulers
import (
2017-02-11 00:05:42 -05:00
"bitbucket.org/sunybingcloud/electron/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 ""
}