1
0
mirror of https://github.com/go-kit/kit.git synced 2025-07-17 01:12:38 +02:00

removed deprecated functions

changed `NewContext -> NewOutgoingContext` and `FromContext ->
FromIncomingContext` as described in
[metadta](https://github.com/grpc/grpc-go/blob/master/metadata/metadata.go)
This commit is contained in:
TRAVIS ALLEN SALAS COX
2017-08-04 14:19:59 -05:00
parent 8e03b4c61a
commit 335e7c72ea
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ func (c Client) Endpoint() endpoint.Endpoint {
for _, f := range c.before {
ctx = f(ctx, md)
}
ctx = metadata.NewContext(ctx, *md)
ctx = metadata.NewOutgoingContext(ctx, *md)
var header, trailer metadata.MD
grpcReply := reflect.New(c.grpcReply).Interface()

View File

@ -73,7 +73,7 @@ func ServerErrorLogger(logger log.Logger) ServerOption {
// ServeGRPC implements the Handler interface.
func (s Server) ServeGRPC(ctx oldcontext.Context, req interface{}) (oldcontext.Context, interface{}, error) {
// Retrieve gRPC metadata.
md, ok := metadata.FromContext(ctx)
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
md = metadata.MD{}
}