2015-01-13 23:31:27 +00:00
|
|
|
package handler
|
|
|
|
|
|
|
|
import (
|
|
|
|
"code.google.com/p/go.net/context"
|
|
|
|
|
2015-01-31 16:49:21 +01:00
|
|
|
log "github.com/golang/glog"
|
2015-05-05 19:05:06 +01:00
|
|
|
"github.com/myodc/go-micro/server"
|
|
|
|
example "github.com/myodc/go-micro/template/proto/example"
|
2015-01-13 23:31:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Example struct{}
|
|
|
|
|
|
|
|
func (e *Example) Call(ctx context.Context, req *example.Request, rsp *example.Response) error {
|
2015-01-31 16:49:21 +01:00
|
|
|
log.Info("Received Example.Call request")
|
2015-01-13 23:31:27 +00:00
|
|
|
|
2015-05-09 00:42:07 +01:00
|
|
|
rsp.Msg = server.Id + ": Hello " + req.Name
|
2015-01-13 23:31:27 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|