Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(limit-count): ensure redis cluster name is set correctly #3910

Merged
merged 15 commits into from
Apr 7, 2021
3 changes: 3 additions & 0 deletions apisix/plugins/limit-count.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ local schema = {
redis_timeout = {
type = "integer", minimum = 1, default = 1000,
},
redis_cluster_name = {
han6565 marked this conversation as resolved.
Show resolved Hide resolved
type = "string", default = "apisix-redis-cluster",
},
},
required = {"redis_cluster_nodes"},
han6565 marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
3 changes: 2 additions & 1 deletion apisix/plugins/limit-count/limit-count-redis-cluster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ local mt = {

local function new_redis_cluster(conf)
local config = {
name = "apisix-redis-cluster",
-- can set different name for different redis cluster
han6565 marked this conversation as resolved.
Show resolved Hide resolved
name = conf.redis_cluster_name,
serv_list = {},
read_timeout = conf.redis_timeout,
auth = conf.redis_password,
Expand Down