Documentation
¶
Overview ¶
Package scheduler_service implements the code for query the scheduler service in other nodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLeastLoadedMachineOfNRandom ¶
func GetLeastLoadedMachineOfNRandom(n uint, currentLoad uint, checkQueues bool) (string, float64, error)
getLeastLoadedMachine retrieves the least loaded machine from an array of ips, if all machines are full loaded, the least queue is returned, and if there is no less loaded queue than us, an error is returned. This function returns (ip, mean_probing_time, errors)
func GetMonitoringLoadUrl ¶
func GetPeerFunctionUrl ¶
Types ¶
type APIResponse ¶
func ExecuteFunction ¶
func ExecuteFunction(host string, request *types.PeerJobRequest) (*APIResponse, error)
ExecuteFunction allows to request another machine to execute a function
type NoLessLoadedMachine ¶
type NoLessLoadedMachine struct {
Reason string
}
func (NoLessLoadedMachine) Error ¶
func (n NoLessLoadedMachine) Error() string