fix(files): add boltdb store and refactor files handlers
This commit is contained in:
parent
044cdea1d4
commit
17b4544487
19 changed files with 751 additions and 402 deletions
7
src/kvstore/boltdbpvd/interface.go
Normal file
7
src/kvstore/boltdbpvd/interface.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package boltdbpvd
|
||||
|
||||
import "github.com/boltdb/bolt"
|
||||
|
||||
type BoltProvider interface {
|
||||
Bolt() *bolt.DB
|
||||
}
|
|
@ -433,6 +433,6 @@ func (bp *BoltPvd) ListStringsByPrefixIn(prefix, ns string) (map[string]string,
|
|||
return results, err
|
||||
}
|
||||
|
||||
func (bp *BoltPvd) StartUpdateTxBolt(op func(*bolt.Tx) error) error {
|
||||
return bp.db.Update(op)
|
||||
func (bp *BoltPvd) Bolt() *bolt.DB {
|
||||
return bp.db
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue