improve calling for content
Signed-off-by: yason <yan.xuean@zte.com.cn>
This commit is contained in:
@@ -26,7 +26,6 @@ import (
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/api/services/tasks/v1"
|
||||
"github.com/containerd/containerd/content"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/containerd/sys"
|
||||
@@ -96,8 +95,6 @@ type criContainerdService struct {
|
||||
snapshotStore *snapshotstore.Store
|
||||
// taskService is containerd tasks client.
|
||||
taskService tasks.TasksClient
|
||||
// contentStoreService is the containerd content service client.
|
||||
contentStoreService content.Store
|
||||
// imageStoreService is the containerd service to store and track
|
||||
// image metadata.
|
||||
imageStoreService images.Store
|
||||
@@ -131,20 +128,19 @@ func NewCRIContainerdService(config options.Config) (CRIContainerdService, error
|
||||
}
|
||||
|
||||
c := &criContainerdService{
|
||||
config: config,
|
||||
apparmorEnabled: runcapparmor.IsEnabled(),
|
||||
seccompEnabled: runcseccomp.IsEnabled(),
|
||||
os: osinterface.RealOS{},
|
||||
sandboxStore: sandboxstore.NewStore(),
|
||||
containerStore: containerstore.NewStore(),
|
||||
imageStore: imagestore.NewStore(),
|
||||
snapshotStore: snapshotstore.NewStore(),
|
||||
sandboxNameIndex: registrar.NewRegistrar(),
|
||||
containerNameIndex: registrar.NewRegistrar(),
|
||||
taskService: client.TaskService(),
|
||||
imageStoreService: client.ImageService(),
|
||||
contentStoreService: client.ContentStore(),
|
||||
client: client,
|
||||
config: config,
|
||||
apparmorEnabled: runcapparmor.IsEnabled(),
|
||||
seccompEnabled: runcseccomp.IsEnabled(),
|
||||
os: osinterface.RealOS{},
|
||||
sandboxStore: sandboxstore.NewStore(),
|
||||
containerStore: containerstore.NewStore(),
|
||||
imageStore: imagestore.NewStore(),
|
||||
snapshotStore: snapshotstore.NewStore(),
|
||||
sandboxNameIndex: registrar.NewRegistrar(),
|
||||
containerNameIndex: registrar.NewRegistrar(),
|
||||
taskService: client.TaskService(),
|
||||
imageStoreService: client.ImageService(),
|
||||
client: client,
|
||||
}
|
||||
|
||||
imageFSPath := imageFSPath(config.ContainerdConfig.RootDir, config.ContainerdConfig.Snapshotter)
|
||||
|
||||
Reference in New Issue
Block a user