mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
parent
031c731c68
commit
8dd14509d7
4 changed files with 7 additions and 10 deletions
|
@ -154,7 +154,7 @@ func (daemon *Daemon) newContainer(name string, operatingSystem string, config *
|
|||
base.ImageID = imgID
|
||||
base.NetworkSettings = &network.Settings{IsAnonymousEndpoint: noExplicitName}
|
||||
base.Name = name
|
||||
base.Driver = daemon.imageService.GraphDriverName()
|
||||
base.Driver = daemon.imageService.StorageDriver()
|
||||
base.OS = operatingSystem
|
||||
return base, err
|
||||
}
|
||||
|
|
|
@ -78,10 +78,9 @@ func (i *ImageService) Cleanup() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// GraphDriverName returns the name of the graph drvier
|
||||
// moved from Daemon.GraphDriverName, used by:
|
||||
// - newContainer
|
||||
func (i *ImageService) GraphDriverName() string {
|
||||
// StorageDriver returns the name of the default storage-driver (snapshotter)
|
||||
// used by the ImageService.
|
||||
func (i *ImageService) StorageDriver() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,6 @@ type ImageService interface {
|
|||
DistributionServices() images.DistributionServices
|
||||
Children(id image.ID) []image.ID
|
||||
Cleanup() error
|
||||
GraphDriverName() string
|
||||
StorageDriver() string
|
||||
UpdateConfig(maxDownloads, maxUploads int)
|
||||
}
|
||||
|
|
|
@ -172,10 +172,8 @@ func (i *ImageService) Cleanup() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// GraphDriverName returns the name of the graph drvier
|
||||
// moved from Daemon.GraphDriverName, used by:
|
||||
// - newContainer
|
||||
func (i *ImageService) GraphDriverName() string {
|
||||
// StorageDriver returns the name of the storage driver used by the ImageService.
|
||||
func (i *ImageService) StorageDriver() string {
|
||||
return i.layerStore.DriverName()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue