From be2cbd0b2d10bc7a6b4aeb09da83a0c04f5572aa Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Tue, 16 Apr 2019 10:19:32 -0700 Subject: [PATCH] Access to client's GRPC connection object Signed-off-by: Maksym Pavlenko --- client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.go b/client.go index af35ec9c9..ff78f7e77 100644 --- a/client.go +++ b/client.go @@ -622,6 +622,13 @@ func (c *Client) VersionService() versionservice.VersionClient { return versionservice.NewVersionClient(c.conn) } +// Conn returns the underlying GRPC connection object +func (c *Client) Conn() *grpc.ClientConn { + c.connMu.Lock() + defer c.connMu.Unlock() + return c.conn +} + // Version of containerd type Version struct { // Version number