Asim Aslam
6468733d98
Use protocol from node metadata
2019-01-18 12:30:39 +00:00
Asim Aslam
9bd32645be
Account for old target
2019-01-18 10:43:41 +00:00
Asim Aslam
f41be53ff8
Add ability to process legacy requests
2019-01-18 10:23:36 +00:00
Asim Aslam
2cd2258731
For the legacy
2019-01-18 10:12:57 +00:00
Asim Aslam
784a89b488
Allow bytes.Frame to be set to sent just bytes
2019-01-16 15:27:57 +00:00
Asim Aslam
00661f8a99
Clarify log message
2019-01-15 15:17:30 +00:00
Asim Aslam
e362466e8a
use default router
2019-01-14 21:45:43 +00:00
Asim Aslam
c1d0237370
Add client response
2019-01-14 21:30:43 +00:00
Asim Aslam
c17d0fcc0f
grpc request
2019-01-13 19:54:07 +00:00
Asim Aslam
e1bc240a14
Respond with error type
2019-01-13 12:15:35 +00:00
Asim Aslam
bfd341a269
Execute wrappers before router
2019-01-11 15:49:54 +00:00
Asim Aslam
36788487a7
set headers as appropriate
2019-01-11 13:44:47 +00:00
Asim Aslam
9adebfcf1e
rename method to endpoint
2019-01-10 21:25:31 +00:00
Asim Aslam
6e0e4a684c
Further crufting
2019-01-09 19:28:13 +00:00
Asim Aslam
873fc6d663
rewriting a lot
2019-01-09 19:11:47 +00:00
Asim Aslam
d004c9624b
Add router modifications
2019-01-09 16:20:57 +00:00
Asim Aslam
ee380c6b7a
reorder
2019-01-09 09:06:30 +00:00
Asim Aslam
7a1f735825
remove server codec
2019-01-09 09:02:30 +00:00
Asim Aslam
f46828be33
Add Router interface
2019-01-08 20:32:47 +00:00
Asim Aslam
4cb41721f1
further codec changes
2019-01-08 15:38:25 +00:00
Asim Aslam
216dbb771a
rename requestHeader
2019-01-07 18:25:31 +00:00
Asim Aslam
c9963cb870
rename
2019-01-07 18:20:47 +00:00
Asim Aslam
9544058af3
Merge pull request #372 from micro/codec
...
Switch default codec and add default codec for server
2019-01-07 17:54:28 +00:00
Asim Aslam
c717af21ac
Some router changes
2019-01-07 17:17:06 +00:00
Asim Aslam
46ece968d4
rename service to router
2019-01-07 14:44:40 +00:00
Asim Aslam
d179c971af
Switch default codec and add default codec for server
2019-01-07 13:48:38 +00:00
Asim Aslam
5aeb28dfee
Add error header
2019-01-07 09:11:36 +00:00
Asim Aslam
ed580204a8
Add grpc codec
2019-01-02 12:55:06 +00:00
Asim Aslam
e2623d8ef5
Make json/protobuf codecs
2018-12-31 22:01:16 +00:00
Asim Aslam
0d917bbf37
move location of handler
2018-11-26 14:51:42 +00:00
Asim Aslam
34ed5235a3
rename rpc codec
2018-11-23 20:05:31 +00:00
Shulhan
415fb3a730
all: replace "pborman/uuid" with "google/uuid"
...
Internally, "pborman/uuid.NewUUID()" is calling "google/uuid.New()"
that return nil when there is an error [1].
Both package use the same license.
[1] https://github.com/pborman/uuid/blob/master/version1.go#L17
2018-11-21 17:29:21 +07:00
Asim Aslam
172ffee8c3
add rpc package comments
2018-11-20 10:30:53 +00:00
Asim Aslam
e69413b763
add continue
2018-11-15 21:13:33 +00:00
Asim Aslam
45f18042b7
make accept loop
2018-11-15 19:55:13 +00:00
Asim Aslam
0672b051cc
Add Local/Remote ip to metadata
2018-11-14 20:27:58 +00:00
Asim Aslam
c6a2c8de6c
add local/remote to testsocket
2018-11-14 19:45:46 +00:00
Mikhail Grachev
25e6dcc9b6
Fix some linter issues
2018-11-13 11:57:42 +03:00
Asim Aslam
a56e97b47d
Change waitgroup processing
2018-05-26 09:41:41 +01:00
Asim Aslam
c666558f8c
make the broker/transport listen on new addr when stop/started with addr :0
2018-05-25 15:19:25 +01:00
Asim Aslam
b39ec4472c
Return subscriber errors
2018-04-26 10:47:13 +01:00
Asim Aslam
0315b4480f
revert some changes
2018-04-17 11:00:22 +01:00
Asim Aslam
19fdfba0bf
move wrapper files
2018-04-14 19:24:17 +01:00
Asim Aslam
d00d76bf7c
Move publication to message
2018-04-14 18:21:02 +01:00
Asim Aslam
65068e8b82
rename Streamer to Stream
2018-04-14 18:15:09 +01:00
Asim Aslam
e55437698b
misc moved to util
2018-04-08 12:37:45 +01:00
Asim Aslam
c9b40cb33b
switch to stdlib context
2018-03-03 11:53:52 +00:00
Tobias Wellnitz, DH1TW
0dcea05fb8
fix possible deadlock since code can return without unlocking the Mutex
2018-01-01 19:57:13 +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
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