pkr/rpc: remove RawConn

Change-Id: I61bc10b82f178a16f27279b85b627553d122c174
This commit is contained in:
Egon Elbre 2019-12-22 17:14:05 +02:00
parent d55288cf68
commit 3849b9a21a

View File

@ -6,17 +6,15 @@ package rpc
import ( import (
"crypto/tls" "crypto/tls"
"storj.io/drpc"
"storj.io/storj/pkg/identity" "storj.io/storj/pkg/identity"
"storj.io/storj/pkg/rpc/rpcpool" "storj.io/storj/pkg/rpc/rpcpool"
) )
// RawConn is a type alias to a drpc client connection
type RawConn = rpcpool.Conn
// Conn is a wrapper around a drpc client connection. // Conn is a wrapper around a drpc client connection.
type Conn struct { type Conn struct {
state tls.ConnectionState state tls.ConnectionState
raw *RawConn raw *rpcpool.Conn
} }
// Close closes the connection. // Close closes the connection.
@ -31,6 +29,6 @@ func (c *Conn) PeerIdentity() (*identity.PeerIdentity, error) {
} }
// Raw returns the underlying connection. // Raw returns the underlying connection.
func (c *Conn) Raw() *RawConn { func (c *Conn) Raw() drpc.Conn {
return c.raw return c.raw
} }