コード例 #1
0
ファイル: retask.go プロジェクト: cluo/distributed-task
/*
	call by server
	send task to client to retask
*/
func Retask(task string) {
	tempMap := make(map[string]string)
	tempMap["task"] = task
	command := &gocommand.Command{"retask", "retask", tempMap}
	temp := gocommand.EnCode(command.GetCommandString())
	gonet.ServerSend(temp)
}
コード例 #2
0
ファイル: reduce.go プロジェクト: cluo/distributed-task
/*
	call by server
	to send the res to client
*/
func reduceToClient() {
	tempMap := make(map[string]string)
	tempMap["result"] = ReduceMap
	command := &gocommand.Command{"reduce", "reduce", tempMap}
	temp := gocommand.EnCode(command.GetCommandString())
	gonet.ServerSend(temp)
	ReduceMap = ""
}