Commit Graph

17 Commits (8907b146d449a5edd680d6388d7af409be5cd2c9)

Author SHA1 Message Date
Brandon Philips 96cce208c2 go.mod: use go.etcd.io/etcd/v3 versioning
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.

Used this tool to update package imports:
  https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
Gyuho Lee 1caaa9ed4a test: test update for Go 1.12.5 and related changes
Update to Go 1.12.5 testing. Remove deprecated unused and gosimple
pacakges, and mask staticcheck 1006. Also, fix unconvert errors related
to unnecessary type conversions and following staticcheck errors:
- remove redundant return statements
- use for range instead of for select
- use time.Since instead of time.Now().Sub
- omit comparison to bool constant
- replace T.Fatal and T.Fatalf in tests with T.Error and T.Fatalf respectively because the goroutine calls T.Fatal must be called in the same goroutine as the test
- fix error strings that should not be capitalized
- use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...))
- use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated
- use use status.Errorf instead of grpc.Errorf which is deprecated

Related #10528 #10438
2019-06-05 17:02:05 -04:00
Gyuho Lee 34bd797e67 *: revert module import paths
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr 9150bf52d6 go modules: Fix module path version to include version number 2019-04-26 15:29:50 -07:00
johncming 51cdbb6d1a contrib/raftexample: add test for struct httpKVAPI. 2019-03-19 11:12:47 +08:00
Gyuho Lee d37f1521b7 *: update import paths to "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Hitoshi Mitake b6eedbacf9 contrib: suppress gosimple errors of raftexample
Travis claimed errors of gosimple like below
(https://travis-ci.org/coreos/etcd/jobs/208098545):
gosimple checking failed:
contrib/raftexample/raftexample_test.go:78:6: should write erri := <-clus.errorC[i] instead of erri, _ := <-clus.errorC[i]
contrib/raftexample/raftexample_test.go:114:10: should write err := <-eC instead of err, _ := <-eC

This commit fixes the errors.
2017-03-06 16:17:22 +09:00
Gyu-Ho Lee e4fbf7db00 raftexample: implement Raft snapshot 2016-09-21 04:23:05 -07:00
Gyu-Ho Lee 666d555450 raftexample: add snapshotter, handle Ready in raft 2016-09-21 04:23:05 -07:00
Gyu-Ho Lee ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Adam Wolfe Gordon 7c0b6d9be9 contrib/raftexample: Allow nodes to be added to a running cluster
A node with ID n can be added by POSTing the new node's URL to /n on the
HTTP server.
2016-02-08 10:51:06 -07:00
Adam Wolfe Gordon 7d862960cc contrib/raftexample: Add a channel for proposing config changes
Add a channel over which we can propose cluster config changes to
raft. In an upcoming commit we'll add an HTTP endpoint that sends config
changes over this channel.
2016-02-08 10:51:06 -07:00
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Anthony Romano 58ac6aeb5a test: activate tests on contrib/raftexample
adds contrib/raftexample to integration tests and fixes two test races
2015-12-23 11:13:37 -08:00
chz 63bc804253 contrib/raftexample: shutdown rafthttp on closed proposal channel
Otherwise listening ports leak across unit tests and ports won't bind.
2015-12-21 13:03:42 -08:00
chz b73a11ff45 contrib/raftexample: follow pipeline guidelines closer
close raft commit channel before issuing raft error since it's done
sending
2015-12-21 13:03:42 -08:00
chz b7cf2385e6 contrib/raftexample: add test, fix dead lock on proposal channel
deadlock if no leader; node selects on propc=nil and writes to Ready,
client blocks on propC in same select as Ready reader, and so progress
of raft state machine deadlocks.
2015-12-21 13:03:35 -08:00