Commit Graph

98 Commits (2bbd26e8e07705b1132a766f4491a26c0a706132)

Author SHA1 Message Date
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
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
Anthony Romano 780a7d359c discovery: remove dead token argument from SRVGetCluster
Can add the argument back when it's actually used something.
2017-04-12 16:49:44 -07:00
Gyu-Ho Lee 60bdc47fa0 discovery: fix print format
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-10 15:04:46 -08:00
Anthony Romano 74ae67b835 discovery: warn on scheme mismatch 2016-11-18 13:12:14 -08:00
fanmin shi eb9a01258e discovery: add upper limit for waiting on a retry
Adding upper limit ensures that expoential backoff doesn't reach more than 5 min on a re-try.

FIX #6648
2016-10-13 20:14:41 -07:00
Anthony Romano 3dc12e33f1 discovery: reject IP address records in SRVGetCluster
Was incorrectly trimming the trailing '.' from the target; this in turn
caused the etcd server to accept any SRV record with an IP target
instead of only targets with A records.
2016-08-23 18:10:42 -07:00
davygeek ea0eab84a4 discovery: Uniform code style 2016-06-30 22:00:01 +08:00
Anthony Romano bbb84ff709 discovery: use pkg/transport to create http transport 2016-06-24 21:04:39 -07:00
Gyu-Ho Lee ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Gyu-Ho Lee c09f23c46d *: clean up bool comparison 2016-04-02 18:27:54 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Anthony Romano c5b51946eb *: exported godoc fixups 2016-02-21 20:36:44 -08:00
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Gyu-Ho Lee 81229dbea9 *: add missing package descriptions
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Dmitry Smirnov b2f4a5f587 *: fix spelling issues (codespell).
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2015-09-11 10:22:29 +10:00
Raoof Mohammed 9a2809f0b5 discovery: log error only if both ssl and non-ssl srv lookups fail
discovery: log error only if both ssl and non-ssl srv lookups fail
Earlier we were logging as soon as one of the lookups failed.

Fixes #3414
2015-09-06 23:44:19 -04:00
Xiang Li 6b23a8131f *: test gofmt with -s and fix reported issues 2015-08-21 18:52:16 -07:00
Xiang Li a47e661fff discovery: print out detailed cluster error 2015-07-29 23:06:57 +08:00
Xiang Li 5fa8652241 client: return cluster error if the etcd cluster is not avaliable
Add a new ClusterError type. It contians all encountered errors and
return ClusterNotAvailable as the error string.
2015-07-29 22:55:15 +08:00
Xiang Li d9c27138fa discovery: return bad discovery endpoint error 2015-07-21 12:53:21 -07:00
Xiang Li dc3f7f5d90 *: detect duplicate name for discovery bootstrap 2015-07-21 12:53:20 -07:00
Yicheng Qin 1db176151b discovery: remove ResponseHeaderTimeout when discovery
The discovery service doesn't return HTTP header early when watch
starts. This may trigger ResponseHeaderTimeout and cause the watch
request failed.

The fix on discovery service may take some time. Remove the
ResponseHeaderTimeout first so it behaves as before.
2015-07-14 16:33:28 -07:00
Xiang Li 1381b44adf discovery: add timeouts for discovery client 2015-06-19 16:50:44 -07:00
Brandon Philips e71dc2e565 discovery: fixup logline
before:

```
discovery: duringcluster status checkconnection tohttps://discovery.etcd.iotimed out, retrying in2s
```

after:

```
discovery: cluster status check: connection to https://discovery.etcd.io timed out, retrying in 2s
```
2015-06-19 13:19:09 -04:00
Xiang Li 2c5ab7ff8b discovery: fix infoln -> info 2015-06-11 14:22:14 -07:00
Xiang Li 8ad7ed321e *:godep log pkg 2015-06-11 14:22:14 -07:00
Xiang Li 2db8b53c4b discovery: use leveled log 2015-06-11 14:22:14 -07:00
Xiang Li e9931fb8b1 discovery: do not return error from etcd
We used to return `key not found` directly to the
user due to a bug. We fixed the bug and added a test
case in this commit.
2015-05-11 10:49:57 -07:00
Xiang Li 9b65ff6959 discovery: drop trailing . from srv target 2015-04-09 07:08:22 -07:00
Xiang Li f5d4c86153 discovery: add a test case for srv
During srv discovery, it should try to match local member with
resolved addr and return unresolved hostnames for the cluster.
2015-04-09 07:07:27 -07:00
Xiang Li a3892221ee *: stop using resolved tcp addr
We start to resolve host into tcp addrs since we generate
tcp based initial-cluster during srv discovery. However it
creates problems around tls and cluster verification. The
srv discovery only needs to use resolved the tcp addr to
find the local node. It does not have to resolve everything
and use the resolved addrs.

This fixes #2488 and #2226
2015-04-09 07:01:48 -07:00
Alex Crawford d9ad6aa2a9 *: update to use IANA-assigned ports 2015-04-06 13:49:43 -07:00
Brian Waldon cd85451971 client: clarify relationship of AfterIndex and waitIndex 2015-02-28 10:45:20 -08:00
Brian Waldon b174732812 client: introduce Error type 2015-02-28 10:38:47 -08:00
Brian Waldon 1c03df62a5 client: WaitIndex -> AfterIndex 2015-02-28 10:38:46 -08:00
Brian Waldon 84ede6fbec client: use options struct for KeysAPI.Get 2015-02-28 10:22:52 -08:00
Brian Waldon 88cea415a7 client: NewDiscoveryKeysAPI -> NewKeysAPIWithPrefix 2015-02-28 10:22:51 -08:00
Brian Waldon 3d4e1f59dc client: drop unnecessary Nodes type 2015-02-28 10:22:51 -08:00
Brian Waldon 3b41b77cd7 client: ClientConfig -> Config 2015-02-28 10:22:51 -08:00
Brian Waldon 74fe28c5e0 client: exchange ClientConfig for SyncableHTTPClient 2015-02-28 10:22:50 -08:00
Brian Waldon 3d53e9bfaa client: pass around options as pointers 2015-02-28 10:22:50 -08:00
Brian Waldon 01fc01ec69 client: KeysAPI.[R]Watch -> Watcher w/ opts struct 2015-02-28 10:19:04 -08:00
Brian Waldon 6d89e6217d client: rename KeysAPI.RecursiveWatch to RWatch 2015-02-28 10:14:25 -08:00
Brian Waldon 4e5c015fe9 client: add Update method 2015-02-28 10:14:25 -08:00
Brian Waldon c6d955f4c1 client: drive Create with setAction; drop TTL 2015-02-28 10:12:35 -08:00
Barak Michener 92dca0af0f *: remove shadowing of variables from etcd and add travis test
We've been bitten by this enough times that I wrote a tool so that
it never happens again.
2015-02-17 16:31:42 -05:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li 08e9c25ea5 *: move srv into pkg discovery 2014-12-24 21:37:20 -08:00
Xiang Li f265afa8ac discovery: fix watch index 2014-12-13 11:15:24 -08:00