Commit Graph

69 Commits (5203de5566f4e5e11de299ac9e15bb9ee2c7bcfc)

Author SHA1 Message Date
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
Xiang Li d9b21c79d4 etcdmain: better logging for discovery error 2014-12-11 16:03:27 -08:00
Xiang Li 7171410422 discovery: discovery will try forever when there is a timeout.
Perviously, etcd retries three times for timeout error. After this
commit, etcd retries forever. Also this commit make etcd client
aware of gateway timetout.
2014-12-10 23:08:24 -08:00
Brian Waldon 9a728a127a dep: bump golang.org/x/net/context
Move from code.google.com/p/go.net/context to
golang.org/x/net/context before bumping to latest.
2014-11-20 10:19:12 -08:00
Jonathan Boulle 8f1885a398 discovery: add command line flag for discovery-proxy 2014-11-06 16:35:24 -08:00
Jonathan Boulle 68bca981de discovery: simplify interface
There's no real need to expose a Discoverer interface/struct when the
only use of the interface (and indeed the module) is to invoke a single
function. This isn't Java, after all. So instead, simplify to Discovery
exposing just two functions: JoinCluster (i.e. what was formerly called
"discovery"), and GetCluster (hitherto "ProxyDiscovery")
2014-11-05 22:45:01 -08:00
Jonathan Boulle bb84aaebaf discovery: add clarifying docstrings 2014-11-04 17:02:33 -08:00
Xiang Li 71acd0c3d0 discovery: consolidate proxyDiscover and Discover interface 2014-11-04 16:38:05 -08:00
Xiang Li 5cb13fd071 *: support discovery fallback 2014-11-04 14:30:22 -08:00
Brian Waldon 17c6f21d68 client: elevate context to caller of KeysAPI 2014-10-31 17:27:43 -07:00
Brian Waldon 0ef270c25c client: pass httpActionDo into New[Discovery]KeysAPI 2014-10-31 17:25:05 -07:00
Brian Waldon 8b8b3efdaa client: accept slice of endpoints 2014-10-31 12:21:15 -07:00
Jonathan Boulle 55c92ad456 *: create ID type
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Xiang Li 027e944985 discovery: fix discovery for not working on customized discovery service 2014-10-29 18:30:59 -07:00
Brian Waldon f21d93ba60 client: define DefaultRequestTimeout 2014-10-24 13:28:04 -07:00
Brian Waldon 45d8fbdcda client: move discovery path logic into client pkg 2014-10-24 13:28:04 -07:00
Brian Waldon ce4df96e69 client: break apart KeysAPI from httpClient 2014-10-24 13:27:59 -07:00
Jonathan Boulle 341c7190d3 test: add govet to tests 2014-10-21 11:32:38 -07:00
Jonathan Boulle b3d5333cb3 *: fix various formatting issues 2014-10-20 17:55:18 -07:00
Jonathan Boulle 7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle e0801360d3 godep: update clockwork dependency 2014-10-17 10:05:29 -07:00
Jonathan Boulle 47c2421f7b godeps: add clockwork 2014-10-17 10:05:29 -07:00
Jonathan Boulle de3bf58876 discovery: switch to fake clock 2014-10-17 10:05:29 -07:00
Jonathan Boulle 7f8f371b0e discovery: add ability to proxy discovery requests 2014-10-16 11:15:04 -07:00
Barak Michener 74ab003e1f Merge pull request #1256 from barakmich/retry
Add logging and backoff and simple retry logic
2014-10-09 13:24:14 -04:00
Barak Michener 5e7267a751 last comment 2014-10-09 13:16:45 -04:00
Xiang Li 8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Barak Michener 5fde52a403 add too many retries test case 2014-10-08 21:58:19 -04:00
Barak Michener 9b35ca3a52 simplify and multiple retry 2014-10-08 21:53:15 -04:00
Barak Michener dbac2e8f15 test retry logic 2014-10-08 19:41:59 -04:00