@@ -45,14 +45,14 @@ const (
4545)
4646
4747var (
48- runtimeService cri.RuntimeService
49- imageService cri.ImageManagerService
50- containerdClient * containerd.Client
51- criContainerdClient api.CRIContainerdServiceClient
48+ runtimeService cri.RuntimeService
49+ imageService cri.ImageManagerService
50+ containerdClient * containerd.Client
51+ criPluginClient api.CRIPluginServiceClient
5252)
5353
54- var criContainerdEndpoint = flag .String ("cri-endpoint" , "/run/containerd/containerd.sock" , "The endpoint of cri plugin." )
55- var criContainerdRoot = flag .String ("cri-root" , "/var/lib/containerd/io.containerd.grpc.v1.cri" , "The root directory of cri plugin." )
54+ var criEndpoint = flag .String ("cri-endpoint" , "/run/containerd/containerd.sock" , "The endpoint of cri plugin." )
55+ var criRoot = flag .String ("cri-root" , "/var/lib/containerd/io.containerd.grpc.v1.cri" , "The root directory of cri plugin." )
5656
5757func init () {
5858 flag .Parse ()
@@ -64,11 +64,11 @@ func init() {
6464// ConnectDaemons connect cri plugin and containerd, and initialize the clients.
6565func ConnectDaemons () error {
6666 var err error
67- runtimeService , err = remote .NewRemoteRuntimeService (* criContainerdEndpoint , timeout )
67+ runtimeService , err = remote .NewRemoteRuntimeService (* criEndpoint , timeout )
6868 if err != nil {
6969 return errors .Wrap (err , "failed to create runtime service" )
7070 }
71- imageService , err = remote .NewRemoteImageService (* criContainerdEndpoint , timeout )
71+ imageService , err = remote .NewRemoteImageService (* criEndpoint , timeout )
7272 if err != nil {
7373 return errors .Wrap (err , "failed to create image service" )
7474 }
@@ -87,7 +87,7 @@ func ConnectDaemons() error {
8787 if err != nil {
8888 return errors .Wrap (err , "failed to connect containerd" )
8989 }
90- criContainerdClient , err = client .NewCRIContainerdClient ( * criContainerdEndpoint , timeout )
90+ criPluginClient , err = client .NewCRIPluginClient ( * criEndpoint , timeout )
9191 if err != nil {
9292 return errors .Wrap (err , "failed to connect cri plugin" )
9393 }
0 commit comments