yocaning opened a new issue #5168:
URL: https://github.com/apache/apisix/issues/5168
### Issue description
how to get etcd value in plugins
this is my code
```
authorizations_etcd, error = core.config.new("/authorizations", {
automatic = true,
item_schema = app_scheme
})
core.log.warn("key: " .. authorizations_etcd.key)
if not authorizations_etcd then
core.log.error("failed to create etcd instance for fetching
authorizations: " .. error)
return
end
local etcd_token ,err=authorizations_etcd:get("yocantest")
for i =1 ,#etcd_token do
core.log.warn("etcd_token: " .. etcd_token[i])
end
if not err then
core.log.warn(err)
end
```
the etcd has value ,but i cant get
>
### Environment
- apisix version (cmd: `apisix version`):2.2
- OS (cmd: `uname -a`):
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info
API):3.4.0
- apisix-dashboard version, if have:
- the plugin runner version, if the issue is about a plugin runner (cmd:
depended on the kind of runner):
- luarocks version, if the issue is about installation (cmd: `luarocks
--version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]