central_api_gateway_event/event/rpc_impl.go

37 lines
525 B
Go
Raw Normal View History

2017-05-20 08:40:58 +00:00
package event
import (
gt "loafle.com/overflow/central_api_gateway/event"
"golang.org/x/net/context"
2017-05-22 03:12:20 +00:00
"log"
2017-05-20 08:40:58 +00:00
)
type TaskResultServerImpl struct {
}
func (d *TaskResultServerImpl)Event(c context.Context,te *gt.TaskResultEvent) (*gt.Empty, error) {
et := &gt.Empty{}
2017-05-22 03:12:20 +00:00
log.Println(te.Data["Description"])
2017-05-20 08:40:58 +00:00
return et, nil
}
type EventServerImpl struct {
}
func (d *EventServerImpl)Event(c context.Context,ae *gt.AgentEvent) (*gt.Empty, error) {
et := &gt.Empty{}
2017-05-22 03:12:20 +00:00
log.Println(ae.Description)
2017-05-20 08:40:58 +00:00
return et, nil
}