854839ba45
fix proto
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-29 10:42:45 +03:00
5350b6ec2b
fix proto
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-29 10:33:48 +03:00
c59d400857
move errors to internal
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-28 12:14:53 +03:00
83b3167030
fix proto
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-24 15:55:25 +03:00
0bc95eaf0d
break server dependency
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-23 22:13:39 +03:00
777fe65378
update deps
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-23 22:08:18 +03:00
a772d2c913
move test to dedicated repo
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-22 12:35:41 +03:00
5f1f7d904f
Merge branch 'upstream'
2020-09-20 14:24:11 +03:00
79136c16d1
add marker flag for sync
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-20 14:20:42 +03:00
78c4a8e9ff
add grpc streaming test
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-20 14:15:26 +03:00
fb33535995
use own fork
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 18:27:29 +03:00
ben-toogood
0fda1710d8
client/grpc: fix stream closed bug ( #2009 )
...
* client/grpc: fix stream closed bug
* client/grpc: don't use dial context for the stream
2020-09-18 16:32:53 +03:00
Asim Aslam
7ef834f0a8
Revert "grpc: avoid allocations for each message ( #1939 )" ( #1941 )
...
This reverts commit 2a23224d911b0aeccf0614afb937a18ad7d59bca.
2020-09-18 16:32:53 +03:00
4cb6fca7e9
grpc: avoid allocations for each message ( #1939 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:53 +03:00
Asim Aslam
5756f43f12
cleanup client/selector/lookup ( #1937 )
...
* cleanup client/selector/lookup
* add mdns router, remove registry from client
* fix roundtripper
* remove comment
* fix compile issue
* fix mucp test
* fix api router
2020-09-18 16:32:53 +03:00
Asim Aslam
14743471af
return a micro error on lookup failure
2020-09-18 16:32:53 +03:00
Asim Aslam
1003b968cf
embed grpc server stream and client so they can be accessed ( #1916 )
2020-09-18 16:32:53 +03:00
ben-toogood
6cb3fad421
Fix proxy being overriden by default addresses ( #1886 )
2020-09-18 16:32:53 +03:00
ben-toogood
d31f820705
client: add proxy option ( #1885 )
...
* client: add proxy option
* client: add WithProxy CallOption
* use address option
* ProxyAddress => Proxy
2020-09-18 16:32:53 +03:00
Asim Aslam
046db9e178
v3 refactor ( #1868 )
...
* Move to v3
Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-09-18 16:32:53 +03:00
ben-toogood
a384632c93
client/grpc: fix error panic ( #1860 )
2020-09-18 16:32:53 +03:00
26e3c83c2d
make LookupRoute exported ( #1850 )
...
* make LookupRoute exported
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* add missing file
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:53 +03:00
456d0c25f6
client/grpc: dont use codec for raw bytes payload ( #1847 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:53 +03:00
ben-toogood
cb2fc6e24d
client/{grpc,rpc}: fix previous breaking change with CallFunc (router.Route vs registry.Node) ( #1781 )
2020-09-18 16:32:53 +03:00
ben-toogood
fa9c531ad9
client: add select options ( #1786 )
2020-09-18 16:32:53 +03:00
ben-toogood
422fd980e9
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-09-18 16:32:53 +03:00
ben-toogood
ea93f93b18
selector: use custom domain ( #1760 )
...
* util/wrapper: improve auth errors
* client: add network call option
* client/selector: add domain select option
* client/grpc: pass network option to selector
2020-09-18 16:32:53 +03:00
ben-toogood
9683d38d19
Apply wrappers to gRPC streams ( #1675 )
...
* Add wrappers to grpc streams
* Fix typo
2020-09-18 16:32:53 +03:00
Asim Aslam
ace96191fe
force codec on call not on dial ( #1599 )
2020-09-18 16:32:53 +03:00
Ben Toogood
a928fc196e
Auth Client Wrapper
2020-09-18 16:32:53 +03:00
750b6d4733
broker: add publish context ( #1590 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:53 +03:00
Asim Aslam
e9db13acab
Add network proxying ( #1556 )
...
* Add network proxying
* go fmt
2020-09-18 16:32:53 +03:00
Ben Toogood
dfd784d4fa
Set authorization header on grpc stream
2020-09-18 16:32:53 +03:00
e0f64db92c
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-09-18 16:32:53 +03:00
Ben Toogood
1a06552877
Further Refactoring
2020-09-18 16:32:52 +03:00
Asim Aslam
5a443abaf1
add stream timeout option which defaults to 0 ( #1456 )
...
* add stream timeout option which defaults to 0
* fix option
2020-09-18 16:32:52 +03:00
Ben Toogood
f03cb96217
Fallback to service token
2020-09-18 16:32:52 +03:00
Ben Toogood
cd1f6fcdc2
ServicePrivileges => ServiceToken
2020-09-18 16:32:52 +03:00
Ben Toogood
c5e30c0e6e
Fixes for CLI login
2020-09-18 16:32:52 +03:00
Ben Toogood
84a7cab60b
WithServicePrivileges => ServicePrivileges
2020-09-18 16:32:52 +03:00
Ben Toogood
21a246ad02
Service => Service Auth
2020-09-18 16:32:52 +03:00
Socket
d5a54ecfa4
grpc pool should check state ( #1435 )
...
Co-authored-by: huangshaojie <huangshaojie@corp.netease.com>
2020-09-18 16:32:52 +03:00
ben-toogood
3ae8bc25f2
Add ContextWithToken ( #1407 )
...
* Add ContextWithToken
* Tidying up BearerScheme
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-09-18 16:32:52 +03:00
1969a92b6e
client/grpc: remove json-iterator usage ( #1387 )
...
* minimize external deps and binary size
* if user wants json-iterator codec it must be used in server and
client code. so best to use it via go-plugins
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:52 +03:00
84a19c5dff
grpc client/server fixes ( #1355 )
...
* grpc client/server fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:52 +03:00
0e1d8c4e47
client/grpc: unwrap error after call ( #1352 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-18 16:32:52 +03:00
ben-toogood
284a4ee0a3
grpc client error fix ( #1351 )
...
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-09-18 16:32:52 +03:00
ben-toogood
4f5a19bf30
Fix Auth Headers ( #1324 )
...
Co-authored-by: Ben Toogood <ben@micro.mu>
2020-09-18 16:32:52 +03:00
Asim Aslam
d0c0366e0c
add websocket streaming to api rpc handler ( #1326 )
2020-09-18 16:32:52 +03:00
ben-toogood
42e9cc97e8
Implement config singleton ( #1268 )
...
* Implement config singleton
* Pass token in grpc request headers
* Refactor BearerScheme
* Fix typo
2020-09-18 16:32:52 +03:00