central_api_gateway_task/task/rpc_impl.go
snoop bbd45142f8 fixed
address
2017-05-29 19:44:41 +09:00

32 lines
575 B
Go

package task
import (
pb "git.loafle.net/overflow/central_api_gateway/task"
"git.loafle.net/overflow/central_api_gateway/commons"
"context"
)
type TaskServerImpl struct {
}
func (s *TaskServerImpl) requestTask(c context.Context, in *commons.Void) (*pb.TaskList, error) {
output := &pb.TaskList{}
tasks := make([]*pb.TaskInfo, 0)
//FIXME
for i := 0; i < 5 ; i++ {
task := &pb.TaskInfo{}
task.TaskId = string(i)
task.Command = commons.TaskEventType_TASK_POL_INTERVAL_UPDATE
tasks = append(tasks, task)
}
output.TaskList = tasks
return output, nil
}