06136312bb
regen files with never protoc ( #6 )
...
* regen files with never protoc
* rewrite import path
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-19 17:47:17 +03:00
Asim Aslam
19ef225b2f
Revert "grpc: avoid allocations for each message ( #1939 )" ( #1941 )
...
This reverts commit 2a23224d91
.
2020-08-18 14:44:29 +01:00
2a23224d91
grpc: avoid allocations for each message ( #1939 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-18 14:24:11 +01:00
Asim Aslam
4413372a3f
Decruft the broker by removing Event interface ( #1940 )
2020-08-18 14:00:51 +01:00
Asim Aslam
6373cc91b7
remove print statement
2020-08-09 19:35:07 +01:00
Asim Aslam
e8ea0f85e9
add a noop registry
2020-08-09 16:17:52 +01:00
Asim Aslam
51f8b4ae3d
embed grpc server stream and client so they can be accessed ( #1916 )
2020-08-09 15:43:41 +01:00
Asim Aslam
4c95c65d81
Return service name in error
2020-08-08 09:09:34 +01:00
Asim Aslam
563768b58a
v3 refactor ( #1868 )
...
* Move to v3
Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-07-27 13:22:00 +01:00
Asim Aslam
1838e4a1ee
remove auth provider
2020-07-19 11:37:40 +01:00
王旭
1bac08cc0e
server.Init(Wait(nil)) update server options context ( #1804 )
...
Co-authored-by: wangxu <wangxu@oneniceapp.com>
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-08 18:36:07 +01:00
Enix Yu
eaa46c2de7
Add recover in grpc service handler ( #1727 )
...
* 🐛 bug(grpc): add missing recover in grpc unkonwn service handler
* Add grpc handler recover testcases
* improve test case
Co-authored-by: ben-toogood <bentoogood@gmail.com>
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-06 20:13:51 +01:00
ben-toogood
5ab475636a
server/{grpc,rpc}: fix deregister domain bug ( #1742 )
...
* server/{grpc,rpc}: fix deregister domain bug
* server/grpc: remove unnecessary slice
2020-06-25 11:25:43 +01:00
ben-toogood
c16f4b741c
server: register in the services namespace ( #1718 )
2020-06-19 09:24:32 +01:00
Asim Aslam
a29676b86a
Registration Retry / Interval ( #1651 )
...
* Change the default ttl to 90 seconds
* add retries to registration
* Add retry to web register
2020-05-20 11:49:09 +01:00
Socket
46d09ec2bc
unsubscribe can async ( #1596 )
...
Co-authored-by: huangshaojie <huangshaojie@corp.netease.com>
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-04-30 10:42:13 +01:00
Asim Aslam
7345ce9192
change logging for service startup
2020-04-23 11:24:39 +01:00
bea092f082
server: set registered only after configuring subscribers ( #1557 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-21 23:01:59 +03:00
Asim Aslam
1768958af7
fix typo
2020-04-08 22:50:56 +01:00
1fbc056dd4
minimize allocations ( #1472 )
...
* server: minimize allocations on re-register
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server: stop old instance before Init()
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* client/grpc: fix allocations in protobuf marshal
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* codec/json: fix allocations in protobuf marshal
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* remove stop from init
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* codec/grpc: expose MaxMessageSize
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* codec: use buffer pool
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* metadata: minimize reallocations
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* util/wrapper: use metadata helper
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* registry/cache: move logs to debug level
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server: move logs to debug level
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server: cache service only when Advertise is ip addr
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server: use metadata.Copy
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-08 10:50:19 +01:00
Asim Aslam
7182ca1fd0
fix server logging ( #1417 )
2020-03-26 13:08:06 +00:00
ab73127063
grpc client/server fixes ( #1355 )
...
* grpc client/server fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-17 14:27:20 +03:00
fbde872e7f
Revert "server/grpc: fix ordering of register and check for registered ( #1338 )" ( #1341 )
...
This reverts commit 62a644ddd8
.
2020-03-13 09:30:44 +00:00
62a644ddd8
server/grpc: fix ordering of register and check for registered ( #1338 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-12 22:04:11 +00:00
7b385bf163
minimize allocations in logger and tunnel code ( #1323 )
...
* logs alloc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* tunnel allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* try to fix tunnel
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* cache cipher for send
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +00:00
64a5ce9607
various fixes ( #1267 )
...
* logger: remove Panic log level
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server/grpc: add missing Unlock in Subscribe error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server: minor code change
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server/grpc: extend test suite with pub/sub testing
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server/grpc: fix invalid check and allow subscriber error to be returned
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* server/grpc: add pubsub tests
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* client/grpc: check for nil req/rsp
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-26 18:34:40 +00:00
24d574ae71
server/grpc: add MaxConn option to limit max inflight requests ( #1247 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-24 13:48:56 +00:00
117f56ebf7
prune util/log and user logger ( #1237 )
...
* prune util/log and user logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* plaintext logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* add newline
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00:00
Lars Lehtonen
c7eed618c2
server/grpc: Prune Unused Code ( #1220 )
...
* server/grpc: remove unused grpcServer.newCodec()
* server/grpc: remove unused defaultRPCCodecs
2020-02-19 20:58:22 +00:00
58598d0fe0
fixes for safe conversation and avoid panics ( #1213 )
...
* fixes for safe convertation
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix client publish panic
If broker connect returns error we dont check it status and use
it later to publish message, mostly this is unexpected because
broker connection failed and we cant use it.
Also proposed solution have benefit - we flag connection status
only when we have succeseful broker connection
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* api/handler/broker: fix possible broker publish panic
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-18 23:05:38 +00:00
Asim Aslam
964b7dee3f
add tls config to server ( #1202 )
...
* add tls config
* add TLSConfig to acme provider
2020-02-15 15:10:26 +00:00
Asim Aslam
158949d0d0
accept Listen option in grpc server ( #1201 )
2020-02-15 14:09:24 +00:00
79ad1e6fe3
various fixes for broker and messaging in server ( #1187 )
...
* provide broker disconnect messages in server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* broker/eats: another fix
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-11 18:41:23 +00:00
7105e4099c
pass micro errors from grpc server to grpc client ( #1167 )
...
* pass micro errors from grpc server to grpc client
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* wrap micro errors.Error to grpc status
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-06 10:18:33 +00:00
efb59d9709
fix map race condition in grpc server
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-01 02:52:53 +03:00
f23638c036
fix import paths for v2 release
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
bdd9ec560b
strip sub comments
2020-01-19 13:47:14 +00:00
Asim Aslam
0c03bf064b
only connect broker if there are subscribers
2020-01-19 13:45:28 +00:00
Asim Aslam
fc08a9146c
Add broker comments on server subscribe
2020-01-19 01:16:36 +00:00
Asim Aslam
13d1d2fa08
hard stop if graceful stop fails after 1 second
2020-01-18 10:18:23 +00:00
Asim Aslam
fd6eb23307
do not wait to stop
2020-01-18 00:58:27 +00:00
f4fb923fb2
pass additional context for broker subscribe ( #1105 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-10 15:04:15 +00:00
Asim Aslam
0b8ff3a8bb
fix grpc json streaming by setting content sub type ( #1089 )
2020-01-07 18:37:34 +00:00
Asim Aslam
225b17559b
fix log streaming
2020-01-02 18:23:43 +00:00
Asim Aslam
c145f355dd
Moving to gRPC by default ( #1069 )
...
* Step 1
* Fix the test panics
2019-12-29 21:07:55 +00:00
a1eaf9cc20
linting fixes
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-04 00:22:02 +03:00
Asim Aslam
bb1a1358b7
Merge pull request #1012 from Astone-Chou/lint
...
improve code quality
2019-12-03 13:10:04 +00:00
Astone
29fb58db39
improve code quality
2019-12-03 20:59:02 +08:00
Astone
f9b900b2ca
optimize: a better way for return error
2019-12-03 12:47:29 +08:00
Asim Aslam
080363e8c4
The mega cruft proxy PR ( #974 )
...
* the mega cruft proxy PR
* Rename broker id
* add protocol=grpc
* fix compilation breaks
* Add the tunnel broker to the network
* fix broker id
* continue to be backwards compatible in the protocol
2019-11-25 16:31:43 +00:00