Created
June 25, 2020 21:48
-
-
Save RicardoLinck/9a2ec04125774c2c918ed68ad6f701c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (*server) Sum(ctx context.Context, req *calculatorpb.SumRequest) (*calculatorpb.SumResponse, error) { | |
log.Printf("Sum rpc invoked with req: %v\n", req) | |
md, _ := metadata.FromIncomingContext(ctx) | |
log.Printf("Metadata received: %v", md) | |
return &calculatorpb.SumResponse{ | |
Result: req.NumA + req.NumB, | |
}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment