Documentation ¶
Index ¶
Constants ¶
const ExecuteTaskName = "Scheduler.ExecuteTask"
ExecuteTaskName is needed for the client side. Client runs this function through an rpc, then Scheduler class calls whichever task is needed.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
AvailableServers []ServerConfiguration `json:"availableServers"`
}
Config contains a list of server configurations for the scheduler with keys for json parsing.
type Scheduler ¶
type Scheduler struct { Port uint Address string Servers []ServerInfo // contains filtered or unexported fields }
Scheduler handles the load balancing. It stores the information about all
func (*Scheduler) ExecuteTask ¶
ExecuteTask is used for transparency with the client. The client requests the task to be executed, but doesn't know which node exactly will execute the task. This function handles all the decisions for the
type ServerConfiguration ¶
type ServerConfiguration struct { Name string `json:"name"` Address string `json:"address"` Port uint `json:"port"` Type string `json:"type"` SupportedTasks []string `json:"supportedTasks"` }
ServerConfiguration contains configuration for one server and keys for the json parsing.
type ServerInfo ¶
type ServerInfo struct {
// contains filtered or unexported fields
}
ServerInfo stores information about servers.