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

feat(clickhouse-logger): support multi clickhouse endpoints #7517

Merged
merged 4 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apisix/plugins/clickhouse-logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local batch_processor_manager = bp_manager_mod.new(plugin_name)
local schema = {
type = "object",
properties = {
endpoint_addrs = {items = core.schema.uri_def, type = "array", minItems = 1},
endpoint_addrs = {items = core.schema.uri_def, type = "array", minItems = 1}, -- deprecated, use "host" instead
zhendongcmss marked this conversation as resolved.
Show resolved Hide resolved
user = {type = "string", default = ""},
password = {type = "string", default = ""},
database = {type = "string", default = ""},
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/clickhouse-logger.t
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ property "endpoint_addrs" is required
"password": "a",
"database": "default",
"logtable": "t",
"endpoint_addrs": ["http://127.0.0.1:10420/clickhouse-logger/test"],
"endpoint_addrs": "http://127.0.0.1:10420/clickhouse-logger/test",
"batch_max_size":1,
"inactive_timeout":1
}
Expand All @@ -183,7 +183,7 @@ property "endpoint_addrs" is required
}
}
--- response_body
passed
property "endpoint_addrs" validation failed: wrong type: expected array, got string



Expand Down