Skip to content

Commit

Permalink
chore: go-ds-pebble v0.4.0
Browse files Browse the repository at this point in the history
Refactor due to ipfs/go-ds-pebble#39
  • Loading branch information
lidel committed Oct 3, 2024
1 parent a5dab45 commit 749ef1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions datastore/pebble/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

var logger = logging.Logger("pebble")

// New returns a BadgerDB datastore configured with the given
// New returns a Pebble datastore configured with the given
// configuration.
func New(cfg *Config) (ds.Datastore, error) {
folder := cfg.GetFolder()
Expand All @@ -38,7 +38,7 @@ increase them one by one, restarting the daemon every time.
`, fmv, newest)
}

db, err := pebbleds.NewDatastore(folder, &cfg.PebbleOptions)
db, err := pebbleds.NewDatastore(folder, pebbleds.WithPebbleOpts(&cfg.PebbleOptions))
if err != nil {
return nil, err
}
Expand All @@ -58,7 +58,7 @@ increase them one by one, restarting the daemon every time.
return db, nil
}

// Cleanup deletes the badger datastore.
// Cleanup deletes the pebble datastore.
func Cleanup(cfg *Config) error {
folder := cfg.GetFolder()
if _, err := os.Stat(folder); os.IsNotExist(err) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require (
contrib.go.opencensus.io/exporter/prometheus v0.4.2
dario.cat/mergo v1.0.0
github.com/blang/semver v3.5.1+incompatible
github.com/cockroachdb/pebble v1.1.1
github.com/cockroachdb/pebble v1.1.2
github.com/coreos/go-systemd/v22 v22.5.0
github.com/dgraph-io/badger v1.6.2
github.com/dgraph-io/badger/v3 v3.2103.5
Expand All @@ -26,7 +26,7 @@ require (
github.com/ipfs/go-ds-badger3 v0.0.2
github.com/ipfs/go-ds-crdt v0.5.2
github.com/ipfs/go-ds-leveldb v0.5.0
github.com/ipfs/go-ds-pebble v0.3.1
github.com/ipfs/go-ds-pebble v0.4.0
github.com/ipfs/go-fs-lock v0.0.7
github.com/ipfs/go-ipfs-api v0.7.0
github.com/ipfs/go-ipfs-cmds v0.8.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/e
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw=
github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU=
github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA=
github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
Expand Down Expand Up @@ -414,8 +414,8 @@ github.com/ipfs/go-ds-crdt v0.5.2/go.mod h1:sJdQqdCp2Vwv1azk1sPl+Dxk780CQc11rf7B
github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc=
github.com/ipfs/go-ds-leveldb v0.5.0 h1:s++MEBbD3ZKc9/8/njrn4flZLnCuY9I79v94gBUNumo=
github.com/ipfs/go-ds-leveldb v0.5.0/go.mod h1:d3XG9RUDzQ6V4SHi8+Xgj9j1XuEk1z82lquxrVbml/Q=
github.com/ipfs/go-ds-pebble v0.3.1 h1:Jyad1qy+d0NZNisaSGUlBSt3dZNHAPl+JThyYe9Rziw=
github.com/ipfs/go-ds-pebble v0.3.1/go.mod h1:XYnWtulwJvHVOr2B0WVA/UC3dvRgFevjp8Pn9a3E1xo=
github.com/ipfs/go-ds-pebble v0.4.0 h1:88lgFAs2ck8jCQ8lMYRBtksEg18r9BlvTxIMnNJkZaQ=
github.com/ipfs/go-ds-pebble v0.4.0/go.mod h1:ZyYU+weIni+4NG/Yjva+cPkU3ghlsU1HA2R/VLHJ9sM=
github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U=
github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc=
github.com/ipfs/go-ipfs-api v0.7.0 h1:CMBNCUl0b45coC+lQCXEVpMhwoqjiaCwUIrM+coYW2Q=
Expand Down

0 comments on commit 749ef1f

Please sign in to comment.