ImageService: rename GraphDriverName to StorageDriver

Make the function name more generic, as it's no longer used only
for graphdrivers but also for snapshotters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-08-09 17:03:50 +02:00
parent 031c731c68
commit 8dd14509d7
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 7 additions and 10 deletions

View File

@ -154,7 +154,7 @@ func (daemon *Daemon) newContainer(name string, operatingSystem string, config *
base.ImageID = imgID base.ImageID = imgID
base.NetworkSettings = &network.Settings{IsAnonymousEndpoint: noExplicitName} base.NetworkSettings = &network.Settings{IsAnonymousEndpoint: noExplicitName}
base.Name = name base.Name = name
base.Driver = daemon.imageService.GraphDriverName() base.Driver = daemon.imageService.StorageDriver()
base.OS = operatingSystem base.OS = operatingSystem
return base, err return base, err
} }

View File

@ -78,10 +78,9 @@ func (i *ImageService) Cleanup() error {
return nil return nil
} }
// GraphDriverName returns the name of the graph drvier // StorageDriver returns the name of the default storage-driver (snapshotter)
// moved from Daemon.GraphDriverName, used by: // used by the ImageService.
// - newContainer func (i *ImageService) StorageDriver() string {
func (i *ImageService) GraphDriverName() string {
return "" return ""
} }

View File

@ -72,6 +72,6 @@ type ImageService interface {
DistributionServices() images.DistributionServices DistributionServices() images.DistributionServices
Children(id image.ID) []image.ID Children(id image.ID) []image.ID
Cleanup() error Cleanup() error
GraphDriverName() string StorageDriver() string
UpdateConfig(maxDownloads, maxUploads int) UpdateConfig(maxDownloads, maxUploads int)
} }

View File

@ -172,10 +172,8 @@ func (i *ImageService) Cleanup() error {
return nil return nil
} }
// GraphDriverName returns the name of the graph drvier // StorageDriver returns the name of the storage driver used by the ImageService.
// moved from Daemon.GraphDriverName, used by: func (i *ImageService) StorageDriver() string {
// - newContainer
func (i *ImageService) GraphDriverName() string {
return i.layerStore.DriverName() return i.layerStore.DriverName()
} }