Commit Graph

280 Commits (279fee668b24ca23bcb2828d6843a266adeb9950)

Author SHA1 Message Date
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
Xiang Li caee28a88e
Merge pull request #10666 from mkumatag/fix_tests
Fix tests for latest golang
2019-05-03 11:18:58 -07:00
shivaramr 9150bf52d6 go modules: Fix module path version to include version number 2019-04-26 15:29:50 -07:00
Davanum Srinivas daee668b75
client: Switch to case sensitive unmarshalling to be compatible with ugorji
Using lessons learned from k8s changes:
https://github.com/kubernetes/kubernetes/pull/65034

Change-Id: Ia17a8f94ae6ed00c5af2595c2b48d3c9a0344427
2019-04-23 16:54:44 -04:00
Davanum Srinivas 86e3481ba2
scripts: Remove generated code and script
Change-Id: Iac4601443bcad71920fd96b97bfe21c16116577a
2019-04-23 16:54:44 -04:00
Davanum Srinivas 90108a2e61
client: Replace ugorji/codec with json-iterator/go
We need to use the stdlib-compatible one that is case-sensitive, etc

Change-Id: Id0df573a70e09967ac7d8c0a63d99d6a49ce82f1
2019-04-23 16:54:44 -04:00
Manjunath A Kumatagi 867b45d865 client: Fix tests for latest golang 2019-04-22 08:14:10 -05:00
zhoulin xie a943ad0ee4 client/keys_bench_test.go: Fix some misspells
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-28 14:36:06 -05:00
Sophos 6543273666 client: generate new keys and remove yynn2 = 0 2019-02-25 12:07:40 +08:00
Sam Batschelet f3fbedc88f client: update generated ugorji codec, manual remove "yynn2=0"
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2018-12-21 18:16:55 -05:00
Sam Batschelet fa35126ef8
*: add client support for discovery-srv-name
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2018-11-09 10:13:04 -05:00
vcaesar fc7ef659cc client,clientv3: update client docs to "go.etcd.io" 2018-08-30 19:26:12 -04:00
Gyuho Lee 0ef9ef3c74 *: rerun "gofmt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 18:25:39 -07: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
Gyuho Lee 42bef8460c *: clean up code format
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:34:56 -07:00
Gyuho Lee 91664ec5ac client: manually delete "yynn2 = 0"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 13:42:50 -07:00
Gyuho Lee 13c440dea4 client: regenerate with f3cacc17c85ecb7f1b6a9e373ee85d1480919868
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 13:42:50 -07:00
Gyuho Lee ebba9ed29e client: regenerate
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 13:42:50 -07:00
Gyuho Lee 0850ccbf45 *: revert "internal/version" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee ebfba72715 client: fix "ineffassign" warning
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 10:07:18 -08:00
Gyuho Lee 37546f74ab *: move "version" to "internal/version"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 10:00:20 -08:00
Gyuho Lee 97cd2a41c8 client,clientv3: remove "cmd/vendor" in README.md
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 15:26:17 -08:00
Gyu-Ho Lee 75110dd839 *: fix naked returns
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 18:46:15 -08:00
Gyu-Ho Lee 81ca10f991 client/keys.generated.go: remove ineffassign yynn2 = 0
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-20 08:52:48 -07:00
Gyu-Ho Lee 1b2a62d9d0 client/keys.generated.go: remove redundant and: x.Expiration != nil
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-20 08:47:01 -07:00
Andrew Meissner 12a6efb74b update: client
Updating the codec required codecgen to be reran on the client/keys.go file.  This is the result of that run.
2017-10-20 09:23:23 -06:00
Gyu-Ho Lee 0199bdc266 *: fix 'ineffassign' issues
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-03 10:14:33 -07:00
Gyu-Ho Lee fbc7acde95 client: permute endpoints manually (for Go 1.9>)
To keep backward compatibility, use old algorithm of
rand.Rand.Perm.

Reference: caae0917bf (diff-d4a72c5ba8515eae95a093e0aec62635).

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-22 10:19:30 +09:00
Alexandre Beslic 8dc4833a3e
client: regenerate sources for etcd/client with new codec version
Major updates to ugorji/go changed the signature of some
methods, resulting in the build failing for etcd/client
with default installation of the codec.

We regenerate the sources using codecgen with the new version
to reflect on the new changes.

Fixes #8573

Signed-off-by: Alexandre Beslic <abeslic@abronan.com>
2017-09-19 15:14:58 +02:00
Anthony Romano 76a35e71be client: fail over to next endpoint on oneshot failure
Fixes #8515
2017-09-08 11:20:20 -07:00
Gyu-Ho Lee f65aee0759 *: replace 'golang.org/x/net/context' with 'context'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Nikola Kovacs 66687da3ba *: grammar fixes, it's -> its 2017-06-15 18:23:16 +02:00
Anthony Romano 1711fdba32 client: sort nodes in example 2017-06-06 10:56:24 -07:00
Anthony Romano 1561eb612c client: add golang examples for KeysAPI 2017-06-05 23:05:17 -07:00
Anthony Romano 07ad18178d pkg/srv: package for SRV utilities
Trying to decouple the v2 client from SRV code. Can't move
into discovery/ since that creates a circular dependency. So,
give up and move all the SRV code into a new package.
2017-05-05 09:27:59 -07:00
Gyu-Ho Lee 22c52b6d2e client/integration: use only digits in unix port
Fix https://github.com/coreos/etcd/issues/7558.

Same as https://github.com/coreos/etcd/issues/6959.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-21 17:10:59 -07:00
shaun.thium 02f4a9a034 client: add GetVersion method
For retrieving etcdserver and etcdcluster version
2017-01-23 18:52:39 -08:00
Dr. Stefan Schimanski 9c364efef6 client: update generated ugorji codec 2016-12-06 07:53:47 +01:00
Anthony Romano ad16b63cce client: update README about health monitoring 2016-11-28 12:28:33 -08:00
Xiang Li 4f60f1b71f Merge pull request #6708 from bluepeppers/leader-sync-deadlock
client: Prevent deadlocks in Sync
2016-11-01 14:11:21 -07:00
Laurie Clark-Michalek de008c8a4a
client: prevent deadlock in Sync 2016-11-01 17:26:53 +00:00
Shaun Crampton 43df091067 client: Return the server's cluster ID as part of the Response
This allows the client to spot if the cluster ID changes, which
would indicate that the cluster has been rebuilt and watches may be
out of sync.

Helps work around #6652.
2016-10-24 14:51:00 +01:00
Gyu-Ho Lee fb39e96862 client: change to 'NoValueOnSuccess' 2016-08-30 10:52:58 -07:00
Michael Fraenkel 82053f04b2 client: do not send previous node data (optional)
- Do not send back node data when specified
- remove node and prevNode when noDataOnSuccess is set
2016-08-30 10:04:09 -07:00
Anthony Romano 449923c98b build: support go install github.com/coreos/etcd/cmd/etcd
Could build via github.com/coreos/etcd/cmd but that would generate a binary
named "cmd", which is not ideal.
2016-08-15 15:08:41 -07:00
Hitoshi Mitake 564bf8d17e client: utility functions for getting detail of v2 auth errors
Current v2 auth API doesn't propagate its error code. This commit adds
utility functions for parsing error messages and getting detail of v2
auth errors.

Fixes https://github.com/coreos/etcd/issues/5894
2016-07-31 21:23:58 +09:00
Anthony Romano c30f89f1d0 client/integration: test v2 client one shot operations 2016-07-07 15:58:58 -07:00
Anthony Romano 946b3cce1d client: make set/delete one shot operations
Old behavior would retry set and delete even if there's an error. This
can lead to the client returning an error for deleting twice, instead
of returning an error for an interdeterminate state.

Fixes #5832
2016-07-07 15:51:08 -07:00
Gyu-Ho Lee 7f3b2e23a4 Merge pull request #5811 from davygeek/golintnotice
client: follow golint notice change errors.New to fmt.Errorf
2016-06-29 09:12:49 -07:00