higress
higress copied to clipboard
Implement the Golang version of the existing CPP Wasm plugin: key-rate-limit
I want to have a try
And, I noticed that the rank of this issue was adjusted to CHALLENGE, so shouldn't there be another developer involved, hopefully I can get some guidance, thanks!
Yeah, the rank was adjusted to level/challenge
, because the wasm-go sdk needs to be extended to support it first.
The areas that need to be expanded are as follows:
- Support the hostcall function
onTick
which binding to the vm context - Design a mechanism that can identify different rules using the same "limit_key"(apply to different domains or ingresses)
我正在编写key-rate-limit的e2e测试,但是我使用goroutine并发进行测试时发现由于http.MakeRequestAndExpectEventuallyConsistentResponse函数为了到达requiredConsecutiveSuccesses = 3的要求时会重复发送请求,这导致我并不能按照我规定的请求数判断预期结果导致测试失败,不知道我的描述是否清晰,期望得到一点帮助,谢谢。
期待回复和帮助
@ZackSoul 可以修改e2e测试框架从而来满足你的测试需求