Commit Graph

2027 Commits

Author SHA1 Message Date
Asim Aslam
a7c4afac54
Merge pull request #213 from weisd/master
add log when register err
2017-11-09 13:50:38 +00:00
Asim Aslam
043e4aa979 please stack overflow 2017-11-03 17:30:16 +00:00
Asim Aslam
78da1fde94
Merge pull request #217 from micro/perf
Performance upgrades
2017-10-29 14:48:23 +00:00
Asim Aslam
e7104d609a return the not found error 2017-10-28 16:21:32 +01:00
Asim Aslam
1890ec7044 rc is not used 2017-10-28 13:55:59 +01:00
Asim Aslam
d48735793d remove ticker 2017-10-26 21:12:48 +01:00
Asim Aslam
6fb652f78a lazily start watcher 2017-10-26 20:55:52 +01:00
Asim Aslam
bd46e60c13 optimise http broker with rcache 2017-10-26 20:48:11 +01:00
Asim Aslam
42235bc973 Merge branch 'master' into perf 2017-10-26 13:47:09 +01:00
Asim Aslam
c07b3636c0 update readme 2017-10-26 12:19:42 +01:00
Asim Aslam
2f09d5830c update readme 2017-10-26 12:18:14 +01:00
Asim Aslam
48513c78b6 further readme culling 2017-10-26 12:16:17 +01:00
Asim Aslam
bd34d39401 update readme 2017-10-26 12:02:52 +01:00
Asim Aslam
59685a4ff9 update readme 2017-10-26 12:02:10 +01:00
weisd
6385bf743c add log when register err 2017-10-25 14:23:58 +08:00
Asim Aslam
8fd8d9bd35 Enable connection pooling and selector caching by default 2017-10-24 15:35:25 +01:00
Asim Aslam
53554d98cd Merge pull request #209 from uffy/master
use sync.Once instead of chan
2017-10-09 14:09:56 +01:00
Uffy
f6165f35c0 import sorting 2017-10-09 20:55:03 +08:00
Uffy
ae3f59a2f5 use sync.Once instead of chan
sync.Once is more clear and faster than chan.
2017-10-09 15:47:28 +08:00
Asim Aslam
0703c514a9 Merge pull request #208 from uffy/master
remove redundant rand.Seed
2017-10-09 07:32:18 +01:00
Uffy
b92130eeee remove redundant rand.Seed 2017-10-09 14:22:15 +08:00
Asim Aslam
e0e4596be0 update readme 2017-10-03 11:19:03 +01:00
Asim Aslam
5f60f7518d update readme 2017-10-03 11:14:39 +01:00
Asim Aslam
f2d4226817 update readme 2017-10-03 11:05:54 +01:00
Asim Aslam
236cfd6a3b update readme 2017-10-03 11:03:46 +01:00
darren-west
d970586a29 Added Options() to registry interface 2017-09-28 11:16:56 +01:00
Asim Aslam
d29b5e2fab Merge pull request #203 from wzhliang/master
fixing typo
2017-08-25 11:00:18 +01:00
Wenzhi Liang
7f173dfc63 fixing typo 2017-08-25 17:56:57 +08:00
Asim Aslam
8be72b676d Merge pull request #202 from freman/mapsorting
Fix hashing of the service definition
2017-08-24 12:16:32 +01:00
Shannon Wynter
0e696f4907 Fix hashing of the service definition
Maps are sorted randomly, order the keys as a slice
2017-08-24 18:25:05 +10:00
Asim Aslam
1748328f14 Merge pull request #201 from vans9/register-subscriber-pass-opts
Pass options to the s.NewSubscriber
2017-08-24 08:53:50 +01:00
Pavel Arefiev
eff39083ca Pass options to the s.NewSubscriber 2017-08-24 10:47:32 +03:00
Asim Aslam
e3f818d18e Merge pull request #197 from sarbash/fix-tls-consul-registry
Check for uninitialized *config.HttpClient
2017-08-15 08:51:50 +01:00
Sergey Sarbash
db0df07fd6 Check for uninitialized *config.HttpClient 2017-08-15 10:49:24 +03:00
Asim Aslam
87c39542b0 Merge pull request #196 from sarbash/fix-tls-consul-registry
Fixes nil pointer dereferencing for Consul TLS transport
2017-08-15 08:08:03 +01:00
Sergey Sarbash
fd01ead575 Fixes nil pointer dereferencing for Consul TLS transport 2017-08-15 09:27:39 +03:00
Asim Aslam
382abbf28b update travis go versions 2017-08-09 13:01:41 +01:00
Asim Aslam
8264e90bce Merge pull request #189 from hlian/master
server/rpc_codec: friendlier behavior if c.codec.Write fails
2017-07-18 14:18:12 +01:00
Hao Lian
d4b149046f server/rpc_codec: if c.codec.Write fails, reset write buffer and encode an error message about the encoding failure
When developing go-micro services, it is frequently possible to set invalid results in the response pointer. When this happens (as I and @trushton personally experienced), `sendResponse()` returns an error correctly explaining what happened (e.g. protobuf refused to encode a bad struct) but the `call()` function one above it in the stack ignores the returned error object.

Thus, invalid structs go un-encoded and the _client side times out_. @trushton and I first caught this in our CI builds when we left a protobuf.Empty field uninitialized (nil) instead of setting it to `&ptypes.Empty{}`. This resulted in an `proto: oneof field has nil value` error, but it was dropped and became a terribly confusing client timeout instead.

This patch is two independent changes:

* In rpc_codec, when a serialization failure occurs serialize an error message, which will correctly become a 500 for HTTP services, about the encoding failure. This means rpc_codec only returns an `error` when a socket failure occurs, which I believe is the behavior that rpc_service is expecting anyway.

* In rpc_service, log any errors returned by sendResponse instead of dropping the error object. This will make debugging client timeouts less of a hassle.
2017-07-17 14:21:43 -04:00
Asim Aslam
e0b3a48323 brevity is key 2017-07-16 14:58:31 +01:00
Asim Aslam
f4ea9787a9 Strip readme comments 2017-07-14 08:24:46 +01:00
Asim Aslam
9438fae607 long standing typo 2017-06-15 19:57:27 +01:00
Asim Aslam
3812cbbcb6 defer wg.Done so it's called even if there's a panic 2017-06-12 14:18:59 +01:00
Asim Aslam
32b7ebcfbc use updated error formatting 2017-06-11 13:02:08 +01:00
Asim Aslam
097395c5cb Merge pull request #172 from micro/func
Function
2017-06-01 12:50:58 +01:00
Asim Aslam
eecf26619b Set register ttl/interval by default for functions since they are more ephemeral 2017-06-01 12:44:18 +01:00
Asim Aslam
1932bc805b update readme 2017-06-01 12:26:57 +01:00
Asim Aslam
e870bffef2 add function test 2017-06-01 12:11:52 +01:00
Asim Aslam
3e9f556e4a working function solution 2017-05-31 20:45:36 +01:00
Asim Aslam
0f1ec6ea0f Merge branch 'master' into func 2017-05-31 19:55:03 +01:00