added ability to iterate over all indexes and use index.Iterate() instead of ReadDir() to walk over the graph

Signed-off-by: Roman Strashkin <roman.strashkin@gmail.com>
This commit is contained in:
Roman Strashkin
2015-07-07 22:13:28 +03:00
parent 46aea60fb0
commit cc955ae73c
9 changed files with 63 additions and 62 deletions
+1 -4
View File
@@ -884,10 +884,7 @@ func (daemon *Daemon) ContainerGraph() *graphdb.Database {
func (daemon *Daemon) ImageGetCached(imgID string, config *runconfig.Config) (*graph.Image, error) {
// Retrieve all images
images, err := daemon.Graph().Map()
if err != nil {
return nil, err
}
images := daemon.Graph().Map()
// Store the tree in a map of map (map[parentId][childId])
imageMap := make(map[string]map[string]struct{})
+1 -4
View File
@@ -55,10 +55,7 @@ func (daemon *Daemon) imgDeleteHelper(name string, list *[]types.ImageDelete, fi
tag = ""
}
byParents, err := daemon.Graph().ByParent()
if err != nil {
return err
}
byParents := daemon.Graph().ByParent()
repos := daemon.Repositories().ByID()[img.ID]
+1 -1
View File
@@ -17,7 +17,7 @@ import (
)
func (daemon *Daemon) SystemInfo() (*types.Info, error) {
images, _ := daemon.Graph().Map()
images := daemon.Graph().Map()
var imgcount int
if images == nil {
imgcount = 0