@@ -20,6 +20,8 @@ import (
|
||||
"github.com/golang/glog"
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||
|
||||
api "github.com/kubernetes-incubator/cri-containerd/pkg/api/v1"
|
||||
)
|
||||
|
||||
// instrumentedService wraps service and logs each operation.
|
||||
@@ -316,3 +318,15 @@ func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtim
|
||||
}()
|
||||
return in.criContainerdService.ListContainerStats(ctx, r)
|
||||
}
|
||||
|
||||
func (in *instrumentedService) LoadImage(ctx context.Context, r *api.LoadImageRequest) (res *api.LoadImageResponse, err error) {
|
||||
glog.V(4).Infof("LoadImage from file %q", r.GetFilePath())
|
||||
defer func() {
|
||||
if err != nil {
|
||||
glog.Errorf("LoadImage failed, error: %v", err)
|
||||
} else {
|
||||
glog.V(4).Infof("LoadImage returns images %+v", res.GetImages())
|
||||
}
|
||||
}()
|
||||
return in.criContainerdService.LoadImage(ctx, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user