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

Change initialisation and add metadata

This commit is contained in:
Asim
2015-05-26 22:39:48 +01:00
parent 7aa2c82ced
commit 36b5ca46fe
16 changed files with 182 additions and 93 deletions

View File

@ -12,8 +12,8 @@ import (
type Example struct{}
func (e *Example) Call(ctx context.Context, req *example.Request, rsp *example.Response) error {
md, _ := c.GetMetaData(ctx)
md, _ := c.GetMetadata(ctx)
log.Info("Received Example.Call request with metadata: %v", md)
rsp.Msg = server.Id + ": Hello " + req.Name
rsp.Msg = server.Config().Id() + ": Hello " + req.Name
return nil
}