mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-05 05:27:35 +08:00
748e33756b
feature: support dynamic upstream in plugin. here is a mini example in `access` phase of plugin: ```lua local up_conf = { type = "roundrobin", nodes = { {host = conf.upstream.ip, port = conf.upstream.port, weight = 1}, } } local ok, err = upstream.check_schema(up_conf) if not ok then return 500, err end local matched_route = ctx.matched_route upstream.set(ctx, up_conf.type .. "#route_" .. matched_route.value.id, ctx.conf_version, up_conf, matched_route) return ``` |
||
---|---|---|
.. | ||
mqtt-proxy.t |