Replies: 1 comment
-
We just supported it in the master branch.
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-transcode.md |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feasibility of supporting pb imports in grpc-transcode plugin
https://github.com/starwing/lua-protobuf/blob/master/README.md
With documents of lua-protobuf, the
unknown_import
call back ofprotoc
object can be used to dealing with unloaded import protos. Following is an example that dealing with nested proto imports, and its output.The difficulty of dealing with proto imports is that the proto files in apisix are stored in ETCD in
/{prefix}/proto/
without directory structure.Cases of using protobuf
There may be three cases that using protobuf, which are:
ways to deal with directory structure of proto files
use apisix config path
We can assume that
/usr/local/apisix/conf/protos/
is the protobuf dependencies searching directory. We can put all third_party dependencies and dependencies that written by users in this searching directory. In this way, apisix can check whether the unknown import proto files exists in the searching directory, and load proto files automatically.use ETCD
Same to the previous, storing proto's in etcd with directory structured keys. That is, make prefix
/apisix/proto/
in etcd as the proto searching directory. This solution may break the code logic and admin api of storing and fetching proto content. Another difficulty is how to load directories into etcd.Beta Was this translation helpful? Give feedback.
All reactions