.
This commit is contained in:
commit
c3d22403a2
63
.gitignore
vendored
Normal file
63
.gitignore
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Go template
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||
.glide/
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
.idea/central_api_gateway_task.iml
|
||||
.idea/modules.xml
|
31
task/rpc_impl.go
Normal file
31
task/rpc_impl.go
Normal file
@ -0,0 +1,31 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
pb "loafle.com/overflow/central_api_gateway/task"
|
||||
"loafle.com/overflow/central_api_gateway/commons"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
||||
type TaskServerImpl struct {
|
||||
}
|
||||
|
||||
func (s *TaskServerImpl) requestTask(c context.Context, in *pb.Empty) (*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
|
||||
}
|
||||
|
5
task/task.go
Normal file
5
task/task.go
Normal file
@ -0,0 +1,5 @@
|
||||
package task
|
||||
|
||||
type taskSupplier struct {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user