Create metadata db object

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-09-22 10:05:35 -07:00
parent acba0f50ef
commit 56c1b79a4c
14 changed files with 56 additions and 30 deletions

View File

@@ -63,7 +63,7 @@ func New(ic *plugin.InitContext) (interface{}, error) {
if err != nil {
return nil, err
}
cs := metadata.NewContentStore(m.(*bolt.DB), ct.(content.Store))
cs := metadata.NewContentStore(m.(*metadata.DB), ct.(content.Store))
runtimes := make(map[string]runtime.Runtime)
for _, rr := range rt {
r := rr.(runtime.Runtime)
@@ -71,7 +71,7 @@ func New(ic *plugin.InitContext) (interface{}, error) {
}
return &Service{
runtimes: runtimes,
db: m.(*bolt.DB),
db: m.(*metadata.DB),
store: cs,
publisher: ic.Events,
}, nil
@@ -79,7 +79,7 @@ func New(ic *plugin.InitContext) (interface{}, error) {
type Service struct {
runtimes map[string]runtime.Runtime
db *bolt.DB
db *metadata.DB
store content.Store
publisher events.Publisher
}