limiter icon indicating copy to clipboard operation
limiter copied to clipboard

Add prototype to support SkipList keys

Open vkuznet opened this issue 2 years ago • 2 comments

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.

vkuznet avatar Mar 25 '22 15:03 vkuznet

The proposed usage would be:

wlist := []string{"::1"}
instance := limiter.New(store, rate, limiter.WithSkipList(wlist))

vkuznet avatar Mar 25 '22 19:03 vkuznet

renamed whitelist to be skiplist to avoid reported here

vkuznet avatar Mar 28 '22 16:03 vkuznet