From 80c837be181e02797ea73c928ef4062c3df26592 Mon Sep 17 00:00:00 2001 From: Sevag Hanssian Date: Sat, 10 Nov 2018 09:47:26 -0800 Subject: [PATCH 1/3] Switch to etcd-io/bbolt --- README.md | 6 ++++-- bolt_store.go | 2 +- bolt_store_test.go | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5d7180a..9b3f499 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,7 @@ This repository provides the `raftboltdb` package. The package exports the It is meant to be used as a backend for the `raft` [package here](https://github.com/hashicorp/raft). -This implementation uses [BoltDB](https://github.com/boltdb/bolt). BoltDB is -a simple key/value store implemented in pure Go, and inspired by LMDB. +This implementation uses [bbolt](https://github.com/etcd-io/bbolt), a currently +maintained fork of the original [BoltDB](https://github.com/boltdb/bolt). + +BoltDB is a simple key/value store implemented in pure Go, and inspired by LMDB. diff --git a/bolt_store.go b/bolt_store.go index a1f9f0b..50959b2 100644 --- a/bolt_store.go +++ b/bolt_store.go @@ -3,8 +3,8 @@ package raftboltdb import ( "errors" - "github.com/boltdb/bolt" "github.com/hashicorp/raft" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/bolt_store_test.go b/bolt_store_test.go index 12b09b2..d4e1859 100644 --- a/bolt_store_test.go +++ b/bolt_store_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/boltdb/bolt" "github.com/hashicorp/raft" + bolt "go.etcd.io/bbolt" ) func testBoltStore(t testing.TB) *BoltStore { From f6c954768764b5f2cc8e360edd173179f7d08f2f Mon Sep 17 00:00:00 2001 From: Sevag Hanssian Date: Sat, 10 Nov 2018 09:47:34 -0800 Subject: [PATCH 2/3] Add go mod files --- go.mod | 9 +++++++++ go.sum | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 go.mod create mode 100644 go.sum diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..c8b5134 --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module github.com/hashicorp/raft-boltdb + +require ( + github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect + github.com/hashicorp/go-immutable-radix v1.0.0 // indirect + github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c + github.com/hashicorp/raft v1.0.0 + go.etcd.io/bbolt v1.3.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..35a791f --- /dev/null +++ b/go.sum @@ -0,0 +1,13 @@ +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c h1:BTAbnbegUIMB6xmQCwWE8yRzbA4XSpnZY5hvRJC188I= +github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/raft v1.0.0 h1:htBVktAOtGs4Le5Z7K8SF5H2+oWsQFYVmOgH5loro7Y= +github.com/hashicorp/raft v1.0.0/go.mod h1:DVSAWItjLjTOkVbSpWQ0j0kUADIvDaCtBxIcbNAQLkI= +go.etcd.io/bbolt v1.3.0 h1:oY10fI923Q5pVCVt1GBTZMn8LHo5M+RCInFpeMnV4QI= +go.etcd.io/bbolt v1.3.0/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= From 92871aa104955f4fff58f5205ecfd9c74f52400d Mon Sep 17 00:00:00 2001 From: Sevag Hanssian Date: Sat, 10 Nov 2018 09:48:35 -0800 Subject: [PATCH 3/3] gofmt --- bolt_store.go | 2 +- bolt_store_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bolt_store.go b/bolt_store.go index 50959b2..050285a 100644 --- a/bolt_store.go +++ b/bolt_store.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/hashicorp/raft" - bolt "go.etcd.io/bbolt" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/bolt_store_test.go b/bolt_store_test.go index d4e1859..bf58230 100644 --- a/bolt_store_test.go +++ b/bolt_store_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/raft" - bolt "go.etcd.io/bbolt" + bolt "go.etcd.io/bbolt" ) func testBoltStore(t testing.TB) *BoltStore {