Commit Graph

458 Commits

Author SHA1 Message Date
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
7f6cefd9c9 fix grpc test 2020-07-19 15:54:33 +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
Di Wu
b37f9c94b8
Fix invalid register check err in log (#1801)
* remove global error tracking

* rpc_server: fix invalid register err

Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-07 14:14:23 +01:00
Di Wu
51caf2a24e
remove global error tracking (#1777)
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-06 20:14:22 +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
174e44b846
Deprecate client/selector (#1767)
* client/{grpc,rpc}: depricate selector (wip)

* {client,cmd}: remove client/selector

* deprecate client/selector

* router/static: fix lookup

* config/cmd: add support for legacy static selector flag

* config/cmd: add support for legacy dns selector flag
2020-07-01 17:06:59 +01:00
Di Wu
132c1e35fe
Fix invalid usage for sync.WaitGroup (#1752)
* Custom private blocks

* Fix invalid usage for sync.WaitGroup

Co-authored-by: Asim Aslam <asim@aslam.me>
2020-06-27 20:07:04 +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
ben-toogood
8dfd93e915 util/wrapper: Add Static Client wrapper (#1685)
* util/wrapper: Add Static Client wrapper

* util/wrapper/static: pass address to stream too

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add static client wrapper tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: fix error message spaces between words

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/{rpc,grpc}: replace log.Error with log.Errorf

* server/grpc: fix log typo

* server/rpc: fix log typo

Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-06-12 10:42:52 +01:00
Ben Toogood
2729569f66 Add Debug.Cache method 2020-05-24 18:45:57 +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
Asim Aslam
19a03babc4
Update server.go 2020-05-12 11:32:01 +01:00
Janos Dobronszki
1eb63635b5
Adding file upload and download capabilities (#1610) 2020-05-11 14:08:27 +02:00
Ben Toogood
506006f0fa Auth Options 2020-05-11 11:47:59 +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
d44adafca5
api/router: avoid unneeded loops and fix path match (#1594)
* api/router: avoid unneeded loops and fix path match

* if match found in google api path syntax, not try pcre loop
* if path is not ending via $ sign, append it to pcre to avoid matching other strings like
  /api/account/register can be matched to /api/account
* api: add tests and validations

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-29 15:23:10 +03: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
Janos Dobronszki
075d7d4fef
Renaming ShutdownSignals -> Shutdown (#1553) 2020-04-21 14:14:20 +02:00
Janos Dobronszki
e5c215556e
Add SIGKILL to shutdown signals (#1552)
* Add SIGKILL to shutdown signals

* go mod tidy

* Add missing file
2020-04-21 14:00:12 +02:00
4d177a782e
vendor proto files from google (#1536)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-15 13:22:32 +03:00
268651df18
regenerate all proto based files (#1531)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-14 16:25:09 +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
Ben Toogood
a9c0e043d2 Fix nil grpc server auth bug 2020-04-03 12:50:50 +01:00
Ben Toogood
49a568e9c0 Set default server auth 2020-04-03 12:33:19 +01:00
9e6db79860
regenerate all proto (#1440)
* regenerate all proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 21:58:32 +01:00
3d7d5ce6b4
api: add static router and improve path parser in rpc handler (#1437)
* api: add static router and improve path parser in rpc handler

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* expose metadata context key to be able to get unmodified map keys

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: fix jsonpb codec for protobuf msg

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* api/handler/rpc: write 204 status code when rsp is nil

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* api/handler/rpc: add check for nil response for non javascript

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 09:04:59 +01:00
Asim Aslam
7182ca1fd0
fix server logging (#1417) 2020-03-26 13:08:06 +00:00
0987363
87617be227
Add client header to rpcRequest header; issue #957 (#1378)
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-03-21 23:25:23 +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
609f4826b3
server: remove duplicate code (#1346)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-13 22:15:09 +00: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
8ee5607254
[WIP]: broker ErrorHandler option (#1296)
* broker ErrorHandler option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* rewrite Event interface, add error

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* implement new interface

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* change ErrorHandler func to broker.Handler

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-06 21:25:16 +00:00
Jake Sanders
a851b9db7a
Comment typo in gRPC subscriber (#1304) 2020-03-05 14:55:46 +00:00
d807dac2a7
server/grpc: avoid panic in case of nil Header (#1303)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-05 17:45:31 +03:00
ce2ba71002
server: subscribe to topic with own name if router not nil (#1295)
* server: subscribe to topic with own name if router not nil

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-05 10:29:50 +03: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
5b0175c2e5
allocations improvements and tunnel fixes (#1248)
* reduce allocations in tunnel code

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* another allocation fix

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* allocate maps with len if it known

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* allocate key for send once

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-24 14:15:20 +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
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
c696a859be fix data race for server Wait option (#931)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-11-09 21:52:41 +00:00
Asim Aslam
a9e8fc6039 Don't set stream unless its true 2019-11-09 10:32:52 +00:00
Till Knuesting
f67c5e779f preallocated slices (#917) 2019-11-05 17:43:12 +00:00
Yang Shi
c14bf5dc4e improve the log of panic recovering (#906) 2019-11-02 23:08:54 +00:00
tegk
f88518d994 used gofmt with -s flag on whole project 2019-11-01 15:07:53 +00:00
Richard Lindhout
a725998c0a
Update rpc_server.go 2019-09-27 16:01:16 +02:00
Richard Lindhout
f3b723ca44
Do nog log error when EOS is being written on an EOF socket 2019-09-27 15:02:21 +02:00
Asim Aslam
fa0d020556 Set register ttl and interval by default 2019-09-23 17:59:34 +01:00
Asim Aslam
ac5eb5da47 Remove fmt 2019-09-22 15:31:07 +01:00
Asim Aslam
2434c7b2a7 replace version format 2019-09-22 15:21:22 +01:00
Shu Xian
c1c173dfe5 recover handler if panic 2019-09-11 00:40:40 +08:00
Asim Aslam
6daf4fda72 Full support for grpc server side 2019-08-26 12:33:59 +01:00
Asim Aslam
36623bfe50 Improve stream processing 2019-08-25 19:30:22 +01:00
Asim Aslam
6128d18ee0 checkpoint fixing data race to process h2 and grpc requests 2019-08-24 20:12:04 +01:00
Milos Gajdos
ba99f037fb
Lock started flag when changing it. 2019-08-23 15:07:08 +01:00
Milos Gajdos
80dc0b97a9
Make server starts and stops idempotent 2019-08-23 15:00:57 +01:00
Asim Aslam
c6e15ef2d1 rename server, set version to timestamp 2019-08-21 15:43:46 +01:00
f1d08f251f fix panic: negative WaitGroup counter
avoid double wait group Done()

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-08-19 13:58:57 +03:00
Asim Aslam
c44fd63301 Force grpc client/server to use grpc codec for broker 2019-08-18 11:28:21 +01:00
Asim Aslam
991142cd57 No need to set request in the buffer 2019-08-16 14:42:45 +01:00
Asim Aslam
88817dc53f Strip some dead code 2019-08-15 20:54:00 +01:00
Asim Aslam
ef04331b86 multiplexing cruft 2019-08-15 20:08:49 +01:00
Asim Aslam
f6b8045dd5 send client error if it exists 2019-08-15 15:22:53 +01:00
Asim Aslam
a42de29f67 Do same for host port on deregister 2019-08-15 08:59:50 +01:00
Shu Xian
bf0e46dc0d fix registry addr error for mq-rpc 2019-08-14 21:32:28 +08:00
Asim Aslam
d0d729a789 fix the tunnel execution 2019-08-11 18:11:33 +01:00
johnson
de34f259ba update service not found error tooltip
fixing test failed issue

change back error type
change registry.ErrNotFound back to selector.ErrNotFound

change back error type
change registry.ErrNotFound back to selector.ErrNotFound

remove the single node tunnel test

Fix read yaml config from memory

package main

import (
	"fmt"

	"github.com/micro/go-micro/config"
	"github.com/micro/go-micro/config/source/memory"
)

var configData = []byte(`
---
a: 1234
`)

func main() {
	memorySource := memory.NewSource(
		memory.WithYAML(configData),
	)
	// Create new config
	conf := config.NewConfig()

	// Load file source
	conf.Load(memorySource)

	fmt.Println(string(conf.Bytes()))
}
2019-08-11 19:31:22 +08:00
Asim Aslam
3adce58eb2 Add monitor/debug packages 2019-08-06 17:53:14 +01:00
Asim Aslam
bb01b3ed78 Don't extract repeated value 2019-08-06 14:52:15 +01:00
Asim Aslam
c3ea25225c Don't check value name on extraction 2019-08-06 14:49:42 +01:00
Asim Aslam
beffa625f8 fix broker log line 2019-08-06 12:25:51 +01:00
Asim Aslam
7884e889f4 Don't publish the process rpc call and embed the router handler in the network 2019-07-31 16:36:53 +01:00
Asim Aslam
a63dcda003 Strip the verbosity of the debug handler 2019-07-28 19:43:50 +01:00
Asim Aslam
1db98ee0f0 move all the buffer references to util/buf 2019-07-28 19:33:24 +01:00
1217ca94b1 bunch of other ipv6 fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-18 08:59:53 +03:00
e688ab0a45 fix ipv6 addr parsing and using
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-17 12:20:29 +03:00
a3bddf5839 changes to minimize allocations and provide useful info
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-17 00:21:03 +03:00
Asim Aslam
c5dd737568 Add back in broker address 2019-07-10 19:58:30 +01:00
Asim Aslam
64ec0633a3 Fix breaks and go fmt 2019-07-10 07:47:17 +01:00
Asim Aslam
0bf54c122f move transport back 2019-07-09 18:41:26 +01:00
Asim Aslam
5cd1e81ba9
Merge pull request #570 from sunfuze/grpc-json-marshal
grpc: using jsonpb.Marshaler to do Marshal, map to jsonpb.Unmarsh
2019-07-08 08:44:51 +01:00
Asim Aslam
e0bf1c2283 Remove Port from registry 2019-07-08 08:01:42 +01:00
Joe
b655f7f55a grpc: using jsonpb.Marshaler to do Marshal, map to jsonpb.Unmarsh 2019-07-08 10:32:10 +08:00
Asim Aslam
4b4ad68eb9 Change Publication to Event 2019-07-07 12:44:09 +01:00
Asim Aslam
777a203f96 gofmt 2019-07-07 12:33:54 +01:00
Asim Aslam
c1097a4509 strip broker address 2019-07-07 12:33:47 +01:00
Asim Aslam
d2d6841f02 Move transport to network/transport 2019-07-07 10:37:34 +01:00
e40307c567 codec grpc: fix extra allocations on message unmarshal
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-04 14:06:29 +03:00
Joe
e88041dc26 if unmarshal target is proto.Message, using jsonpb 2019-07-04 16:43:36 +08:00
Asim Aslam
d8e998ad85 add peer in context 2019-06-27 14:53:01 +01:00
Asim Aslam
9630e153a5 fix grpc proto wrapper 2019-06-27 13:08:06 +01:00
Asim Aslam
8d5d812e32 Fix a streaming bug 2019-06-20 12:44:51 +01:00
Asim Aslam
d3a6297b17 Add working grpc proxy config 2019-06-18 18:51:52 +01:00
Asim Aslam
f65694670e add cruft 2019-06-17 20:05:58 +01:00
johnson
baaa386e27 a. add default context type when header not found
b. return subscribe error after handler finished
2019-06-17 17:54:37 +08:00
johnson
363fb551af missing nil check for grpc WaitGroup 2019-06-17 17:07:55 +08:00