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
parent b722b4338b
commit 422f951014
2 changed files with 5 additions and 25 deletions

11
util.go
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 {