apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
167 stars 69 forks source link

request help: The plugin is registered, but cannot be viewed through v1/schema #133

Closed zxyao145 closed 1 year ago

zxyao145 commented 1 year ago

Issue description

I compiled the plugin for the official example and packaged it into an docker image, at startup, I see a log prompt indicating that the plugin has been registered:

2023/03/30 18:46:33 [warn] 190#190: *916 [lua] init.lua:953: 2023-03-30T18:46:33.246+0800       INFO    plugin/plugin.go:73     register plugin fault-injection
2023-03-30T18:46:33.246+0800    INFO    plugin/plugin.go:73     register plugin limit-req
2023-03-30T18:46:33.246+0800    INFO    plugin/plugin.go:73     register plugin response-rewrite
2023-03-30T18:46:33.246+0800    INFO    plugin/plugin.go:73     register plugin say
2023-03-30T18:46:33.246+0800    WARN    server/server.go:192    conf cache ttl is 1h12m0s
2023-03-30T18:46:33.246+0800    WARN    server/server.go:200    listening to /usr/local/apisix/conf/apisix-49.sock
, context: ngx.timer

but when visit the api 127.0.0.1:9090/v1/schema, I can not find the plugin.

And my configuration file looks like the following:

ext-plugin:
  cmd: ["/usr/local/apisix/user-plugins/go-runner", "run"]

What should I do to see the plugin correctly?

Environment

soulbird commented 1 year ago

Currently only supports obtaining the schema of native plugins written in lua language

zxyao145 commented 1 year ago

Currently only supports obtaining the schema of native plugins written in lua language

So, how should I use ext-plugin? There seems to be no documentation for this part

soulbird commented 1 year ago

Refer: https://github.com/apache/apisix-go-plugin-runner/blob/master/docs/en/latest/getting-started.md

zxyao145 commented 1 year ago

Refer: https://github.com/apache/apisix-go-plugin-runner/blob/master/docs/en/latest/getting-started.md

Thank you, this is useful, and it would be better if it could be collected in https://apisix.apache.org/zh/docs/apisix/external-plugin/