Update metadata plugin initialization

Updates metadata plugin to require content and
snapshotter plugins be loaded and initializes with
those plugins, keeping the metadata database structure
static after initialization. Service plugins now only
require metadata plugin access snapshotter or content
stores through metadata, which was already required
behavior of the services.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-10-03 15:48:05 -07:00
parent 2ab70f21ac
commit 8d892a651b
11 changed files with 84 additions and 95 deletions

View File

@@ -23,7 +23,7 @@ func createContentStore(ctx context.Context, root string) (content.Store, func()
return nil, nil, err
}
return NewContentStore(NewDB(db), cs), func() error {
return NewDB(db, cs, nil).ContentStore(), func() error {
return db.Close()
}, nil
}