func GetApiUrl(host string) string
func GetLeastLoadedMachineOfNRandom(n uint, currentLoad uint, checkQueues bool, cached bool) (string, float64, error)
GetLeastLoadedMachineOfNRandom 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(host string) string
func GetPeerFunctionUrl(host string, functionName string) string
type APIResponse struct { Headers http.Header Body []byte StatusCode int }
func ExecuteFunction(host string, peerRequest *types.PeerJobRequest) (*APIResponse, error)
ExecuteFunction allows to request another machine to execute a function
func GetLoad(host string) (int, *APIResponse, error)
GetLoad allows to get the load of another machine, from a machine
type NoLessLoadedMachine struct { Reason string }
func (n NoLessLoadedMachine) Error() string