Skip to content

Commit 665715b

Browse files
Merge pull request #3208 from mxpv/client
Allow reuse client for external GRPC services
2 parents cc73dc3 + be2cbd0 commit 665715b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,13 @@ func (c *Client) VersionService() versionservice.VersionClient {
622622
return versionservice.NewVersionClient(c.conn)
623623
}
624624

625+
// Conn returns the underlying GRPC connection object
626+
func (c *Client) Conn() *grpc.ClientConn {
627+
c.connMu.Lock()
628+
defer c.connMu.Unlock()
629+
return c.conn
630+
}
631+
625632
// Version of containerd
626633
type Version struct {
627634
// Version number

0 commit comments

Comments
 (0)