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

update the example to message the naming of code generated protos

This commit is contained in:
Asim
2016-01-06 12:37:35 +00:00
parent dee9cbb763
commit f467902304
4 changed files with 115 additions and 49 deletions

View File

@ -23,7 +23,7 @@ func (e *Example) Stream(ctx context.Context, req *example.StreamingRequest, str
for i := 0; i < int(req.Count); i++ {
log.Infof("Responding: %d", i)
if err := stream.SendR(&example.StreamingResponse{
if err := stream.Send(&example.StreamingResponse{
Count: int64(i),
}); err != nil {
return err
@ -35,12 +35,12 @@ func (e *Example) Stream(ctx context.Context, req *example.StreamingRequest, str
func (e *Example) PingPong(ctx context.Context, stream example.Example_PingPongStream) error {
for {
req, err := stream.RecvR()
req, err := stream.Recv()
if err != nil {
return err
}
log.Infof("Got ping %v", req.Stroke)
if err := stream.SendR(&example.Pong{Stroke: req.Stroke}); err != nil {
if err := stream.Send(&example.Pong{Stroke: req.Stroke}); err != nil {
return err
}
}