Skip to content

Commit

Permalink
badgerds: use go-ds-badger from gx
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
  • Loading branch information
magik6k committed Jul 10, 2017
1 parent 62f7a8f commit 0f20573
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@
"hash": "QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh",
"name": "go-block-format",
"version": "0.1.2"
},
{
"author": "magik6k",
"hash": "QmTC7BY2viSAbPbGte6NyMZJCC2xheaRBYKEn4BuzTxe7W",
"name": "go-ds-badger",
"version": "0.1.10"
}
],
"gxVersion": "0.10.0",
Expand Down
20 changes: 10 additions & 10 deletions repo/fsrepo/datastores.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package fsrepo
import (
"bytes"
"fmt"
"os"
"path/filepath"

repo "github.com/ipfs/go-ipfs/repo"
Expand All @@ -13,10 +14,9 @@ import (
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
mount "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/syncmount"

badgerds "github.com/ipfs/go-ds-badger"
levelds "gx/ipfs/QmPdvXuXWAR6gtxxqZw42RtSADMwz4ijVmYHGS542b6cMz/go-ds-leveldb"
badgerds "gx/ipfs/QmTC7BY2viSAbPbGte6NyMZJCC2xheaRBYKEn4BuzTxe7W/go-ds-badger"
ldbopts "gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/opt"
"os"
)

// ConfigFromMap creates a new datastore config from a map
Expand All @@ -37,13 +37,13 @@ var datastores map[string]ConfigFromMap

func init() {
datastores = map[string]ConfigFromMap{
"mount": MountDatastoreConfig,
"flatfs": FlatfsDatastoreConfig,
"levelds": LeveldsDatastoreConfig,
"badger": BadgerdsDatastoreConfig,
"mem": MemDatastoreConfig,
"log": LogDatastoreConfig,
"measure": MeasureDatastoreConfig,
"mount": MountDatastoreConfig,
"flatfs": FlatfsDatastoreConfig,
"levelds": LeveldsDatastoreConfig,
"badgerds": BadgerdsDatastoreConfig,
"mem": MemDatastoreConfig,
"log": LogDatastoreConfig,
"measure": MeasureDatastoreConfig,
}
}

Expand Down Expand Up @@ -292,7 +292,7 @@ func (c measureDatastoreConfig) Create(path string) (repo.Datastore, error) {
}

type badgerdsDatastoreConfig struct {
path string
path string
}

func BadgerdsDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error) {
Expand Down

0 comments on commit 0f20573

Please sign in to comment.