1
0
mirror of https://github.com/gusaul/grpcox.git synced 2024-12-26 02:40:10 +00:00
Commit Graph

14 Commits

Author SHA1 Message Date
Muhammad Auliya
c83858ebfc
Merge pull request #27 from davidgoitia/allow_protoset
allow protoset file
2021-02-16 17:49:53 +07:00
Muhammad Auliya
b941d8727d
Merge pull request #20 from risoll/i_rizky_metadata
add ctx metadata
2021-02-16 17:46:34 +07:00
David Goitia
d1a4237cb2
allow protoset file 2021-02-05 17:21:41 +01:00
gusaul
ec4ba2090d change invoke handler directly to bytes buffer 2020-11-03 09:37:50 +07:00
gusaul
8aa67b6529 update pipe commit output to handling huge output 2020-11-02 20:02:07 +07:00
risoll
1080e8f0b0 add ctx metadata 2020-06-02 00:22:22 +07:00
gusaul
3908c00c11 add mutex to append conn to map to avoid concurrent map access 2020-05-29 08:14:33 +07:00
Matias Alvin
293bb364c0 feat(descriptor): add support for local proto descriptor
Currently, grpcox depends on server reflection to get proto descriptor. It has a
significant drawback, since not every grpc server support
[server
reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#known-implementations).
Using local proto files is more feasible, as every grpc server certainly have
one.

Even though using protofile should be simple enough, there's still a problem
regarding this. Some protofile use extra plugins for their proto. i.e.
gogoprotobuf is a project that does just that. The problems with plugins are
most of them require explicit import to the plugin inside of the protofile. It
will break grpcurl proto descriptor extraction. Thus, the plugin proto must be
uploaded alongside the protofile. Also, the protofile should be modified
automatically to change their import to local import.

Given that, I proposed a way for the user to upload multiple protofile to
grpcox. Then, use that to get the descriptor.

Changelog:
- Add `use local proto` checkbox in HTML client. On checked it will show upload
button and list of selected proto.
- `get-service` ajax will use POST when `use local proto` is checked. The
uploaded protofile will be the payload for the ajax request.
- Add a new route to handle POST "get-service". It will persist the uploaded
protofile to `/tmp/` directory and add protos field in the resource.
- Modify `openDescriptor` to use local proto if protos field in the resource is
available.
- Modify `openDescriptor` to return an error, as opening descriptor from local
proto may fail.
- Modify the main server so it can be shut down gracefully. This is necessary as
grpcox need to remove persisted proto right after the server is turned off.

This Pull Request will resolve #16
2020-01-31 10:27:46 +07:00
gusaul
2676b0ccef separate reflection descriptor from established conn 2019-11-13 12:12:58 +07:00
gusaul
5026c0a359 add expiry connection and automatic close 2019-04-05 18:07:19 +07:00
gusaul
37d525bcb8 add timeout cancelation connection 2019-04-02 09:45:50 +07:00
gusaul
f44b1a7f78 save and reuse active connections 2019-03-13 10:38:30 +07:00
aultokped
75b72d5c7b remove os exit from handling 2018-11-05 13:48:26 +07:00
gusaul
54ab742f5c first commit 2018-11-05 02:56:06 +07:00