0f4b1435d9
move implementations to external repos ( #17 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-25 13:44:41 +03:00
c4a303190a
lint fixes ( #14 )
...
* lint fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-21 14:53:21 +03:00
199ff66bd4
enable cache for build, closes #8 ( #12 )
...
* enable cache for build, closes #8
* goimports
* lint fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-20 15:23:41 +03:00
98ba3b2788
grpc: avoid allocations for each message ( #11 )
...
* grpc: avoid allocations for each message
* fix tests for api/router
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-20 14:45:47 +03:00
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 2a23224d911b0aeccf0614afb937a18ad7d59bca.
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
zuoan
61899398b3
simplifies code ( #1934 )
...
Co-authored-by: 刘海洋 <haiyang@snqu.com>
2020-08-17 11:10:42 +03:00
Asim Aslam
13f495587e
cleanup debug and transport ( #1920 )
2020-08-10 15:58:39 +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
64feb6dff2
Add subscriber naem
2020-08-08 09:21:13 +01:00
Asim Aslam
4c95c65d81
Return service name in error
2020-08-08 09:09:34 +01:00
Asim Aslam
1439b101ec
ensure register ttl and interval are set
2020-08-03 22:44:29 +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
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