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:
co-authored by
Alexander Bezobchuk
Federico Kunze
parent
c44813bcdf
commit
4e0a475751
Vendored
+19
@@ -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{}
|
||||
Reference in New Issue
Block a user