grpc client/server fixes (#1355)

* grpc client/server fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-03-17 14:27:20 +03:00
committed by GitHub
parent 03031a694d
commit ab73127063
7 changed files with 63 additions and 41 deletions

View File

@@ -2,7 +2,6 @@ package grpc
import (
"context"
"fmt"
"io"
"os"
"sync"
@@ -10,16 +9,6 @@ import (
"google.golang.org/grpc/codes"
)
// rpcError defines the status from an RPC.
type rpcError struct {
code codes.Code
desc string
}
func (e *rpcError) Error() string {
return fmt.Sprintf("rpc error: code = %d desc = %s", e.code, e.desc)
}
// convertCode converts a standard Go error into its canonical code. Note that
// this is only used to translate the error returned by the server applications.
func convertCode(err error) codes.Code {