Commit Graph

314 Commits

Author SHA1 Message Date
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
ben-toogood
aa9a0a8d23
Fix Micro Proxy nil Transport Bug (#1208) 2020-02-17 12:28:48 +03: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
ben-toogood
d621548120
Auth (#1147)
Implement the Auth interface, with JWT and service implementations.

* Update Auth Interface

* Define Auth Service Implementation

* Support Service Auth

* Add Auth Service Proto

* Remove erronious files

* Implement Auth Service Package

* Update Auth Interface

* Update Auth Interface. Add Validate, remove Add/Remove roles

* Make Revoke interface more explicit

* Refactor serializing and deserializing service accounts

* Fix srv name & update interface to be more explicit

* Require jwt public key for auth

* Rename Variables (Resource.ID => Resource.Name & ServiceAccount => Account)

* Implement JWT Auth Package

* Remove parent, add ID

* Update auth imports to v2. Add String() to auth interface
2020-02-03 08:16:02 +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
Micro
62c067adcd Refactor debug/trace ready for Jaeger 2020-01-29 15:45:11 +00:00
Asim Aslam
6d636b7ab3 whoa bad commit, bad asim 2020-01-22 17:07:56 +00:00
Asim Aslam
009c598049 Change version to latest 2020-01-22 17:03:38 +00:00
Lars Lehtonen
7a17a221ff
server: remove unused invalidRequest 2020-01-20 10:09:27 -08: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
0a37767127 Fix service registration with registry service 2020-01-18 19:53:51 +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
Maarten Bezemer
50b20413d3 RPC stream client/server mutex fix (#884)
* Unlock RPC client while actually receiving a message

As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'

* Unlock RPC server while actually receiving a message

As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'

* Protect Close() against race conditions

* Concurrency and Sequence tests
2020-01-12 09:13:14 +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
e697912ee5 don't panic on nil 2020-01-01 21:56:29 +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
943445270f fix registry check issue (#1067)
fix #1066

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-28 11:11:46 +00:00
Eagle Wu
a09b6729cc Fix missing recover while occur panic in handler (#1063) 2019-12-27 10:53:11 +00:00
Asim Aslam
4e02f444fd
Merge pull request #1024 from unistack-org/server
add server Context option to pass own context
2019-12-17 08:48:39 +00:00
Astone
caa1bcf9fe named return value for error defer modify. 2019-12-09 11:08:21 +08:00
Asim Aslam
c445aed6b1 Cleanup and speedup network convergence along with direct messaging for connect and solicit 2019-12-07 19:54:29 +00:00
1c5a4c470f add server Context option to pass own context
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-05 19:37:03 +03:00
Milos Gajdos
5865e89bed
Fixing dead code and go vet moaning 2019-12-05 16:10:49 +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
b8e96f45d4 add recovery in case of panics
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-03 02:25:40 +03:00
Asim Aslam
af94899b54 Fix rpc go routine leak 2019-11-27 17:12:07 +00:00
Asim Aslam
5932dd753c
Merge pull request #981 from unistack-org/subscriber
subscriber recovery
2019-11-27 10:28:51 +00:00
86a6328254 subscriber recovery
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-11-27 13:21:20 +03:00
Asim Aslam
8b63df7a98 regenerate the protos 2019-11-26 13:53:33 +00: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
49d73faa5f return error to caller on grpc server request processing (#962)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-11-20 10:28:30 +00:00
da6c1be607 dont panic on missing headers in broker event (#963)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-11-20 07:55:47 +00:00
Asim Aslam
9f481542f3
Fix a codec race by locking the buffers. Include a buffer pool for perf. (#941)
* Fix a codec race by locking the buffers. Include a buffer pool for perf.

* Read Lock on buffer Read
2019-11-13 11:05:53 +00:00
Asim Aslam
72522a869a fix endpoint extractor panic 2019-11-11 17:37:48 +00:00
Till Knuesting
5ae3e179b9 preallocated slices (#934) 2019-11-11 00:03:51 +00:00