Bump konnectivity-client to v0.0.12

This commit is contained in:
Jefftree
2020-09-22 13:24:18 -07:00
parent 79cc8be2cd
commit 89d5adc050
10 changed files with 22 additions and 16 deletions

View File

@@ -51,6 +51,12 @@ type grpcTunnel struct {
connsLock sync.RWMutex
}
type clientConn interface {
Close() error
}
var _ clientConn = &grpc.ClientConn{}
// CreateSingleUseGrpcTunnel creates a Tunnel to dial to a remote server through a
// gRPC based proxy service.
// Currently, a single tunnel supports a single connection, and the tunnel is closed when the connection is terminated
@@ -79,7 +85,7 @@ func CreateSingleUseGrpcTunnel(address string, opts ...grpc.DialOption) (Tunnel,
return tunnel, nil
}
func (t *grpcTunnel) serve(c *grpc.ClientConn) {
func (t *grpcTunnel) serve(c clientConn) {
defer c.Close()
for {