Commit Graph

4 Commits

Author SHA1 Message Date
YuanSheng Wang
748e33756b
refactory: collect upstream logic and put them in a single file. (#1734)
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
```
2020-06-22 14:21:42 +08:00
YuanSheng Wang
188b1849b2
bugfix: compare server_port with number data type. (#1154) 2020-02-24 19:32:32 +08:00
WenMing
12a2b01b71
license: add ASF header. (#743) 2019-10-31 09:27:28 +08:00
YuanSheng Wang
ad2b67ee81
feature: supported to added pluings to stream routes. (#513)
* feature: supported to added pluings to stream routes.
* feature: supported MQTT protocol.
2019-09-16 10:58:27 +08:00