Questions tagged [boltdb]

Bolt is a pure Go key/value store inspired by Howard Chu's and the LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Bolt is a pure Go key/value store inspired by Howard Chu's and the LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL. View more at https://github.com/boltdb/bolt.

41 questions
14
votes
2 answers

Best way to store data in BoltDB

I am new to BoltDB and Golang, and trying to get your help. So, I understand that I can only save byte array ([]byte) for key and value of BoltDB. If I have a struct of user as below, and key will be the username, what would be the best choice to…
Gon
  • 733
  • 3
  • 8
  • 23
13
votes
3 answers

Loki config with s3

I can't get Loki to connect to AWS S3 using docker-compose. Logs are visible in Grafana but the S3 bucket remains empty. The s3 bucket is public and I have an IAM role attached to allow s3:FullAccess. I updated loki to v2.0.0 and changed the period…
markhorrocks
  • 1,199
  • 19
  • 82
  • 151
8
votes
1 answer

BoltDB performance as a backend DB

I am thinking about using BoltDB as a backend main DB and have few question with my Go code; also need your opinion of using BoltDB as a main backend DB. I am using Go's net/http, and use boltDb as global variable. When the program starts, it will…
Gon
  • 733
  • 3
  • 8
  • 23
6
votes
2 answers

Boltdb-key-Value Data Store purely in Go

Bolt obtains a file lock on the data file so multiple processes cannot open the same database at the same time. Opening an already open Bolt database will cause it to hang until the other process closes it. As this is the case,is there any…
Raunak Dugar
  • 247
  • 3
  • 14
4
votes
1 answer

Key Order in BoltDB

Which endian should be used for a boltdb's key? Should I get the endian of the machine first and use that? I need the keys to be ordered properly - just as a sequence of bytes, no specific logic for ordering them. For example which endian should be…
Kaveh Shahbazian
  • 13,088
  • 13
  • 80
  • 139
4
votes
1 answer

Does boltdb support concurrent queries for reading and updating the db?

Currently using boltdb for storing various entries in the bucket. How can I use goroutines and channels in reading and updating in the db?
Raunak Dugar
  • 247
  • 3
  • 14
3
votes
1 answer

Is it safe to use embedded database (RocksDB, BoltDB, BadgerDB) on DigitalOcean block storage?

DigitalOcean block storage uses ceph which means that volume attached to the droplet would be physically located on a different machine. So a database file written to this volume would be using network, not the local disk. BoltDB specifically…
yname
  • 2,189
  • 13
  • 23
3
votes
1 answer

Batching Operations in Boltdb

Currently using db.Update() to update the key-value in boltdb. err := db.Update(func(tx *bolt.Tx) error { b, err := tx.CreateBucket([]byte("widgets")) if err != nil { return err } if err := b.Put([]byte("foo"),…
Raunak Dugar
  • 247
  • 3
  • 14
2
votes
1 answer

Go boltDB query using bolthold 3 conditions

So I had this question before and I had an answer below the question which worked, but I just realized that the query I came out with does not work as planned. Basically now if it works like this (if the roleskey contains any of the roles in slice)…
Marius
  • 537
  • 1
  • 6
  • 23
2
votes
0 answers

boltdb data format for (space) efficient storage

I need to store business data from mysql into bolt. The data is a map[string]string looks like this: {"id": "", "shop_id":"12345678", "date": "20181019"... } Since the amount of data will be huge and increasing, apart from splitting the data…
xrfang
  • 1,754
  • 4
  • 18
  • 36
2
votes
1 answer

Is etcd using boltdb for it's backend?

I came across on this issue on ectd #2646, it is quite old post but I can't find anything on the docs. Does etcd has its own storage engine, or it is using boltdb or some other backend? Thanks
zer09
  • 1,507
  • 2
  • 28
  • 48
2
votes
1 answer

Manually edit boltdb file

I have an app written on golang and I want to create a builin database, I've selected boltdb. I have some init data that I want to seed into database manually. I have database.db file and I want to put some data into it. When I open this file - I…
Vnuuk
  • 6,177
  • 12
  • 40
  • 53
2
votes
2 answers

Getting started with Bleve using BoltDB

I am trying to wrap my head around Bleve and I understand everything that is going on in the tutorials, videos and documentation. I however get very confused when I am using it on BoltDB and don't know how to start. Say I have an existing BoltDB…
Mardwan
  • 139
  • 3
  • 14
1
vote
1 answer

Loki s3 configuration for chunks and indexes

I'm deploying Loki with the helm chart loki-distributed on our Kubernetes cluster, and trying to configure Loki to use an s3 bucket for chunks and indexes, but no folder or file has been created on my s3 bucket, here is my values.yaml file used for…
Hamza AZIZ
  • 2,582
  • 1
  • 9
  • 18
1
vote
0 answers

Store and retrieve items in order using BoltDB

I am using BoltDB with Golang and want to store and then retrieve my items in the order they were placed into my database. I am setting items using func (r *Bolt) Set(key string, value []byte) error { return r.Client.Update(func(tx *bolt.Tx)…
N P
  • 2,319
  • 7
  • 32
  • 54
1
2 3