From 2db3bf7a8905ca3578fb20544bbe269b37803d68 Mon Sep 17 00:00:00 2001 From: Hussein Galal Date: Thu, 29 Apr 2021 22:11:19 +0200 Subject: [PATCH] Export CriConnection function (#3225) Signed-off-by: galal-hussein --- pkg/agent/containerd/containerd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/agent/containerd/containerd.go b/pkg/agent/containerd/containerd.go index 42e7eacc8b..63f128cc62 100644 --- a/pkg/agent/containerd/containerd.go +++ b/pkg/agent/containerd/containerd.go @@ -99,7 +99,7 @@ func Run(ctx context.Context, cfg *config.Node) error { first := true for { - conn, err := criConnection(ctx, cfg.Containerd.Address) + conn, err := CriConnection(ctx, cfg.Containerd.Address) if err == nil { conn.Close() break @@ -121,7 +121,7 @@ func Run(ctx context.Context, cfg *config.Node) error { } // criConnection connects to a CRI socket at the given path. -func criConnection(ctx context.Context, address string) (*grpc.ClientConn, error) { +func CriConnection(ctx context.Context, address string) (*grpc.ClientConn, error) { addr, dialer, err := util.GetAddressAndDialer("unix://" + address) if err != nil { return nil, err @@ -173,7 +173,7 @@ func preloadImages(ctx context.Context, cfg *config.Node) error { } defer client.Close() - criConn, err := criConnection(ctx, cfg.Containerd.Address) + criConn, err := CriConnection(ctx, cfg.Containerd.Address) if err != nil { return err }