Commit Graph

43 Commits (bc9e433ca26be0314a37c8c6ead66429a584bbc9)

Author SHA1 Message Date
Piotr Tabor 5ba46f625f pkg/mock: Update imports to point on new files locations.
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock/mockserver|go.etcd.io/etcd/v3/client/mock/mockserver|g'
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock|go.etcd.io/etcd/v3/server/mock|g'
go fmt ./...
2020-10-12 23:58:09 +02:00
Piotr Tabor 28f2b07623 *: Update references to code moved to the api/ dir.
Follow up to file-moves done in the previous commit.

The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):

  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'

  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'

  I also modified manually paths in scripts/genproto.sh.

  % go fmt ./...
2020-10-06 11:56:16 +02:00
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
Joe Betz 221f0cc107
Merge pull request #11564 from eddycjy/balancer-error
clientv3: Fix grpc-go(v1.27.0) incompatible changes to balancer/resolver.
2020-03-06 10:35:22 -08:00
EDDYCJY 4258cdd2ef clientv3: fix grpc-go(v1.27.0) incompatible changes to balancer/resolver. 2020-02-18 18:27:53 +08:00
yoyinzyc b90d801beb clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0. 2020-01-30 14:51:24 -08:00
Joe Betz 594354b886
Replace endpoint.ParseHostPort with net.SplitHostPort to fix IPv6 client endpoints 2019-10-08 14:53:49 -07:00
Joe Betz 97388ce454
clientv3: Set authority used in cert checks to host of endpoint 2019-09-25 15:14:23 -07:00
Gyuho Lee 8c7c6ec0c1 clientv3/balancer: refactor
refactor + remove unused

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:19 -07: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
Joe Betz c7c6894527
Merge pull request #10551 from johncming/lbname
clientv3/balancer: change balancer name to builder name.
2019-04-10 16:16:51 -07:00
zhoulin xie cc08c1bd2e clientv3/integration/leasing_test.go: Fix t.Fatalf error message
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-04-10 13:19:50 -04:00
johncming ddff08ffad clientv3/balancer: change balancer name to builder name. 2019-03-18 11:05:22 +08:00
Xiang Li e1ca3b4434
Merge pull request #10531 from JoeWrightss/patch-3
Fix some variable spelling errors
2019-03-12 12:09:09 -07:00
zhoulin xie 939b4f8599 clientv3/balancer/grpc1.7-health.go: Fix variable spelling error
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-03-10 01:11:02 +08:00
Gyuho Lee 4f46b65748 clientv3: use default info level log configuration
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-21 10:57:38 -08:00
Shin'ya Ueoka aa4313a55a *: fix github links 2018-11-10 11:14:18 +09:00
Gyuho Lee 2ac04381a2 clientv3: update Go import paths to "go.etcd.io"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Joe Betz 67bcf28c4e
clientv3: Use passthrough resolver for direct endpoint dialing 2018-07-27 10:15:02 -07:00
Joe Betz b3b06a862a
clientv3: Fix maintenance APIs to directly dial grpc endpoints correctly. 2018-07-23 11:20:15 -07:00
Gyuho Lee 90a5da18cf clientv3: clean up code format
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:03:12 -07:00
Gyuho Lee dbccfe06fb clientv3/balancer: debugging balancer test failures
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-05 12:18:13 -07:00
Gyuho Lee 7e542078bc clientv3/balancer: skip "TestRoundRobinBalancedResolvableFailoverFromServerFail" for now
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-05 11:57:45 -07:00
Gyuho Lee a3032d3d0b *: fix fmt tests, reenable "testEmbedEtcdGracefulStop"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz 8569b9c782 clientv3: Fix endpoint resolver to create a new resolver for each grpc client connection 2018-06-15 13:41:28 -07:00
Joe Betz 9304d1abd1 clientv3: Fix TLS test failures by returning DeadlineExceeded error from dial without any additional wrapping 2018-06-15 13:41:28 -07:00
Joe Betz ee2747eba8 clientv3: Fix dial calls to consistently use endpoint resolver, attempt to deflake alarm test 2018-06-15 13:41:28 -07:00
Joe Betz f84f554301 clientv3: Fix auth client to use endpoints instead of host when dialing, fix tests to block on dial when required. 2018-06-15 13:41:28 -07:00
Joe Betz 66e65cd660 clientv3: Avoid timeouts in ordering test 2018-06-15 13:41:28 -07:00
Joe Betz 7ac2a2dd20 clientv3: Fix dialer for new balancer to correctly handle first are as endpoint, not hostname 2018-06-15 13:41:28 -07:00
Joe Betz 309208dbef clientv3: Split out grpc balancer builder to ensure there is a balancer per ClientConn 2018-06-15 13:41:28 -07:00
Joe Betz f20a1173d8 clientv3: Fix new load balancer integration issues 2018-06-15 13:41:28 -07:00
Joe Betz 6080fa1270 clientv3: Integrate new grpc load balancer interface with etcd client 2018-06-15 13:41:28 -07:00
Joe Betz ed6bc2b554 clientv3: add load balancer unix socket test 2018-06-15 13:41:28 -07:00
Joe Betz 4d2a25b056 clientv3/balancer: add endpoints resolver 2018-06-15 13:41:28 -07:00
Gyuho Lee 9867210a54 clientv3/balancer: add "TestRoundRobinBalancedPassthrough" (WIP)
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee 370761de82 clientv3/balancer: add more failover tests with resolver
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee 7c92185fe3 clientv3/balancer: use new mock server in tests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz 657c2e15cc *: introduce mock server for testing load balancing and add a simple happy-path load balancer test
Author:    Joe Betz <jpbetz@google.com>
Date:      Wed Mar 28 15:51:33 2018 -0700
2018-06-15 13:41:28 -07:00
Gyuho Lee 7fe4a08fdc clientv3/balancer: initial commit
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee 3aa5711dca clientv3: move health balancer to "balancer"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 15:16:11 -07:00