Commit Graph

39 Commits

Author SHA1 Message Date
Sergey Sarbash
db0df07fd6 Check for uninitialized *config.HttpClient 2017-08-15 10:49:24 +03:00
Sergey Sarbash
fd01ead575 Fixes nil pointer dereferencing for Consul TLS transport 2017-08-15 09:27:39 +03:00
Asim
c289f6acaa Make use of consul 0.7 deregister field. Now auto reaps dead services 2016-11-25 11:23:37 +01:00
chriss
fabdd4a704 Remove consul token helper method.
A Consul config struct can be passed using the `Config` helper making this helper redundant.
2016-11-21 16:16:24 +00:00
Asim
f9709ffa6e ensure the code does not panic 2016-11-18 07:30:50 +00:00
chriss
8a25723fe0 Set consul token via registry options.
Optionally configure a token to use with the consul client.
2016-11-18 00:07:12 +00:00
chriss
3d7187f405 Add the ability to pass consul client config via registry options.
This can be used when you need to configure the consul client to use a specific configuration (E.G to pass a Token if consul is using ACL policies)
2016-11-17 23:24:14 +00:00
Jelmer Snoeck
e59f7a7ace
ConsulRegistry: use health checks to select nodes.
Consul sees a healthcheck that is in the warning state as a "failed"
node. This means that when we ask Consul for services that are passing,
it would not return nodes that have warning healthchecks.

In the cache, we only check on critical to skip for nodes. This makes
the cache out of sync with the non-cache implementation.

This patch reworks the non-cache implementation to ask for all nodes
(even unhealthy ones) and does the same check as within the cache, skip
nodes that have critical healthchecks.

We've noticed this issue when we deployed custom healthchecks where the
cache was acting properly, but after 1 minute we saw "None Available"
errors. This is due to the TTL expiry on the cache, which is then
followed by doing a non cached request.
2016-08-26 08:36:45 +01:00
Asim
e2855c4bc2 Fix some mapping issues while we're at it 2016-04-09 22:19:03 +01:00
Asim
9d7bd3f424 God damn you nil map 2016-04-09 21:34:45 +01:00
Asim
b3fbd36ba7 Don't re-register if the state hasn't changed 2016-04-09 21:30:31 +01:00
Asim
61178d1b45 Update encoding to be backwards compatible. 2016-03-29 17:44:46 +01:00
Asim
e941796234 Add encoding that does not throw warns 2016-03-16 21:23:41 +00:00
Asim
f088074f29 Registry init 2016-03-15 22:20:21 +00:00
Asim
61094fefe8 If TTL is nil it might bail 2016-01-27 00:32:16 +00:00
Asim
55145d08a1 Use agent service for this 2016-01-27 00:15:46 +00:00
Asim
5ec9d561a6 meh 2016-01-26 23:32:27 +00:00
Asim
cd13f0389f Fix this cruft 2016-01-26 20:44:29 +00:00
Asim
822cc0e5da Use ServiceID as node.ID rather than Node.... in time remove Node/Address completely 2016-01-26 20:30:05 +00:00
Asim
a6ce435a07 If secure or tlsconfig not nil then secure 2016-01-17 00:33:07 +00:00
Asim
ae2ab911ed Access tls config 2016-01-16 23:39:47 +00:00
Asim
60ee085cbc Add secure option to registry 2016-01-16 20:25:18 +00:00
Asim
be43d827c7 Add String method to all interfaces 2015-12-19 21:56:14 +00:00
Asim
d7b3765c71 Allow setting of timeout for registry 2015-12-19 18:28:08 +00:00
Asim
d4f3a6070c Update the watch interface 2015-12-05 01:12:29 +00:00
Asim
9b23729eac add default port where none is specified 2015-11-16 12:11:03 +00:00
Asim
0320fc1b55 Update registry so version is surfaced 2015-11-08 01:48:48 +00:00
Asim
d9ae100524 Fix registry address usage 2015-10-26 20:23:57 +00:00
Asim
fcbd2acdde add endpoint data for consul registry 2015-10-11 12:05:20 +01:00
Asim
113cc8a9cb Remove service id so nodes are also removed from catalog 2015-08-15 23:03:50 +01:00
Asim
09c784d294 add support for streaming requests. cleanup watcher initilisation 2015-06-01 18:55:27 +01:00
Asim
36b5ca46fe Change initialisation and add metadata 2015-05-26 22:39:48 +01:00
Asim
7aa2c82ced Service and node should be structs rather than interface 2015-05-25 22:14:28 +01:00
Asim
74fd1fc989 Restructure go-micro layout and plugins 2015-05-23 20:04:16 +01:00
Asim
0e7bd77f4c Allow configurable addresses for everything 2015-05-16 00:34:02 +01:00
Asim
52f140da5f Add support for listing services, very rough 2015-04-03 00:52:49 +02:00
Asim
4b494966fb Add consul watcher 2015-02-14 23:00:47 +00:00
Asim
0e73a84857 github.com/armon/consul-api was deprecated, use official api 2015-01-19 19:37:28 +00:00
Asim
8e55cde513 First 2015-01-13 23:31:27 +00:00