Skip to content

Commit 3702a7c

Browse files
committed
adds raft consensus. Multinode test needs fixing
1 parent 5caff15 commit 3702a7c

File tree

9 files changed

+625
-45
lines changed

9 files changed

+625
-45
lines changed

api/v1/log.pb.go

Lines changed: 50 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1/log.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ option go_package = "gitlab.com/jonny7/distrolog/api/log_v1";
77
message Record {
88
bytes value = 1;
99
uint64 offset = 2;
10+
uint64 term = 3;
11+
uint32 type = 4;
1012
}
1113

1214
service Log {

go.mod

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ require (
66
github.com/casbin/casbin v1.9.1
77
github.com/gorilla/mux v1.8.0
88
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
9+
github.com/hashicorp/raft v1.1.1
10+
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea
911
github.com/hashicorp/serf v0.8.5
1012
github.com/stretchr/testify v1.7.0
1113
github.com/travisjeffery/go-dynaport v1.0.0
@@ -19,21 +21,23 @@ require (
1921

2022
require (
2123
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
22-
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
24+
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
2325
github.com/davecgh/go-spew v1.1.1 // indirect
2426
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
2527
github.com/golang/protobuf v1.5.2 // indirect
2628
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
2729
github.com/hashicorp/errwrap v1.0.0 // indirect
30+
github.com/hashicorp/go-hclog v0.9.1 // indirect
2831
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
29-
github.com/hashicorp/go-msgpack v0.5.3 // indirect
32+
github.com/hashicorp/go-msgpack v0.5.5 // indirect
3033
github.com/hashicorp/go-multierror v1.0.0 // indirect
3134
github.com/hashicorp/go-sockaddr v1.0.0 // indirect
3235
github.com/hashicorp/golang-lru v0.5.0 // indirect
3336
github.com/hashicorp/memberlist v0.1.3 // indirect
3437
github.com/miekg/dns v1.0.14 // indirect
3538
github.com/pmezard/go-difflib v1.0.0 // indirect
3639
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
40+
go.etcd.io/bbolt v1.3.5 // indirect
3741
go.uber.org/atomic v1.4.0 // indirect
3842
go.uber.org/multierr v1.1.0 // indirect
3943
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
@@ -42,3 +46,5 @@ require (
4246
golang.org/x/text v0.3.5 // indirect
4347
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
4448
)
49+
50+
replace github.com/hashicorp/raft-boltdb => github.com/travisjeffery/raft-boltdb v1.0.0

0 commit comments

Comments
 (0)