update kube and dependencies to v1.23
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
31
vendor/google.golang.org/grpc/rpc_util.go
generated
vendored
31
vendor/google.golang.org/grpc/rpc_util.go
generated
vendored
@@ -258,7 +258,8 @@ func (o PeerCallOption) after(c *callInfo, attempt *csAttempt) {
|
||||
}
|
||||
|
||||
// WaitForReady configures the action to take when an RPC is attempted on broken
|
||||
// connections or unreachable servers. If waitForReady is false, the RPC will fail
|
||||
// connections or unreachable servers. If waitForReady is false and the
|
||||
// connection is in the TRANSIENT_FAILURE state, the RPC will fail
|
||||
// immediately. Otherwise, the RPC client will block the call until a
|
||||
// connection is available (or the call is canceled or times out) and will
|
||||
// retry the call if it fails due to a transient error. gRPC will not retry if
|
||||
@@ -828,26 +829,28 @@ func Errorf(c codes.Code, format string, a ...interface{}) error {
|
||||
|
||||
// toRPCErr converts an error into an error from the status package.
|
||||
func toRPCErr(err error) error {
|
||||
if err == nil || err == io.EOF {
|
||||
switch err {
|
||||
case nil, io.EOF:
|
||||
return err
|
||||
}
|
||||
if err == io.ErrUnexpectedEOF {
|
||||
case context.DeadlineExceeded:
|
||||
return status.Error(codes.DeadlineExceeded, err.Error())
|
||||
case context.Canceled:
|
||||
return status.Error(codes.Canceled, err.Error())
|
||||
case io.ErrUnexpectedEOF:
|
||||
return status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
if _, ok := status.FromError(err); ok {
|
||||
return err
|
||||
}
|
||||
|
||||
switch e := err.(type) {
|
||||
case transport.ConnectionError:
|
||||
return status.Error(codes.Unavailable, e.Desc)
|
||||
default:
|
||||
switch err {
|
||||
case context.DeadlineExceeded:
|
||||
return status.Error(codes.DeadlineExceeded, err.Error())
|
||||
case context.Canceled:
|
||||
return status.Error(codes.Canceled, err.Error())
|
||||
}
|
||||
case *transport.NewStreamError:
|
||||
return toRPCErr(e.Err)
|
||||
}
|
||||
|
||||
if _, ok := status.FromError(err); ok {
|
||||
return err
|
||||
}
|
||||
|
||||
return status.Error(codes.Unknown, err.Error())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user