Make client.Context implement gRPC ClientConn (#6342)

* Add QueryConn to client.Context

* Add integration test

* imports

* spelling

* Make client.Context implement grpc ClientConn

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Aaron Craelius
2020-06-08 13:41:30 +00:00
committed by GitHub
co-authored by Alexander Bezobchuk Federico Kunze
parent c44813bcdf
commit 4e0a475751
6 changed files with 87 additions and 18 deletions
+19
View File
@@ -0,0 +1,19 @@
package testdata
import (
"context"
"fmt"
)
type TestServiceImpl struct{}
func (e TestServiceImpl) Echo(_ context.Context, req *EchoRequest) (*EchoResponse, error) {
return &EchoResponse{Message: req.Message}, nil
}
func (e TestServiceImpl) SayHello(_ context.Context, request *SayHelloRequest) (*SayHelloResponse, error) {
greeting := fmt.Sprintf("Hello %s!", request.Name)
return &SayHelloResponse{Greeting: greeting}, nil
}
var _ TestServiceServer = TestServiceImpl{}