1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Cleanup and move template

This commit is contained in:
Asim
2015-05-25 18:16:42 +01:00
parent 94dee7a459
commit 5516f7ea1f
14 changed files with 78 additions and 145 deletions

View File

@ -0,0 +1,19 @@
package handler
import (
log "github.com/golang/glog"
c "github.com/myodc/go-micro/context"
example "github.com/myodc/go-micro/examples/server/proto/example"
"github.com/myodc/go-micro/server"
"golang.org/x/net/context"
)
type Example struct{}
func (e *Example) Call(ctx context.Context, req *example.Request, rsp *example.Response) error {
md, _ := c.GetMetaData(ctx)
log.Info("Received Example.Call request with metadata: %v", md)
rsp.Msg = server.Id + ": Hello " + req.Name
return nil
}