bbd45142f8
address
32 lines
575 B
Go
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
|
|
}
|
|
|