limiter
limiter copied to clipboard
Add prototype to support SkipList keys
Hi, based on my understanding of the code the WhiteList can be easily added. The prototype of changes is presented in this PR. Of course, this can be further extended along with requirements and guidelines of the main codebase. Any feedback is welcome here.
The proposed usage would be:
wlist := []string{"::1"}
instance := limiter.New(store, rate, limiter.WithSkipList(wlist))
renamed whitelist to be skiplist to avoid reported here