Add content and snapshot store references
Update database object to hold reference to the data stores. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
package metadata
|
||||
|
||||
import "github.com/boltdb/bolt"
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
)
|
||||
|
||||
type DB struct {
|
||||
db *bolt.DB
|
||||
|
||||
storeL sync.Mutex
|
||||
ss map[string]*snapshotter
|
||||
cs *contentStore
|
||||
}
|
||||
|
||||
func NewDB(db *bolt.DB) *DB {
|
||||
return &DB{
|
||||
db: db,
|
||||
ss: map[string]*snapshotter{},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user