How to use Store from redisstore on httplimit.NewMiddleware ?
FRHuda opened this issue · 4 comments
FRHuda commented
i need to create middleware from httplimit.NewMiddleware
. but its func can't take store
from redisstore.New
because redisstore.New
return store
, not storeWithContext
.
it happen in
github.com/sethvargo/go-limiter v0.4.1
github.com/sethvargo/go-redisstore v0.1.2
but i can use redisstore for httplimit.NewMiddleware
in older version.
sethvargo commented
There's a runtime type assertion, so you can do something like store.(limiter.StoreWithContext)
sethvargo commented
Or wait for sethvargo/go-redisstore#5 to merge and release.
sethvargo commented
v0.1.3
github-actions commented
This issue has been automatically locked since there has not been any
recent activity after it was closed. Please open a new issue for
related bugs.