Skip to content

Commit 0555d45

Browse files
arajkumarmetalmatze
authored andcommitted
Use localstorage bucket for persistence
Signed-off-by: Arunprasad Rajkumar <[email protected]>
1 parent 0892114 commit 0555d45

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

frostdb/frostdb.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/prometheus/prometheus/storage"
2323
"github.com/prometheus/prometheus/tsdb/chunkenc"
2424
"github.com/segmentio/parquet-go"
25+
"github.com/thanos-io/objstore/providers/filesystem"
2526
)
2627

2728
type FrostDB struct {
@@ -43,12 +44,14 @@ type FrostQuerier struct {
4344

4445
// Open a new frostDB
4546
func Open(dir string, reg prometheus.Registerer, logger log.Logger) (*FrostDB, error) {
47+
bucket, err := filesystem.NewBucket(dir)
4648
ctx := context.Background()
4749
store, err := frost.New(
4850
logger,
4951
reg,
5052
frost.WithWAL(),
5153
frost.WithStoragePath(dir),
54+
frost.WithBucketStorage(bucket),
5255
)
5356
if err != nil {
5457
return nil, err

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ require (
175175
github.com/sirupsen/logrus v1.8.1 // indirect
176176
github.com/spf13/pflag v1.0.5 // indirect
177177
github.com/stretchr/objx v0.2.0 // indirect
178+
github.com/tidwall/gjson v1.10.2 // indirect
179+
github.com/tidwall/match v1.1.1 // indirect
180+
github.com/tidwall/pretty v1.2.0 // indirect
181+
github.com/tidwall/tinylru v1.1.0 // indirect
182+
github.com/tidwall/wal v1.1.7 // indirect
178183
go.mongodb.org/mongo-driver v1.8.3 // indirect
179184
go.opencensus.io v0.23.0 // indirect
180185
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0 // indirect

0 commit comments

Comments
 (0)