Open adrianlungu opened 3 weeks ago
We can't add a backend specific argument (partitionKey
) to the Increment()
method as it won't make sense for other backends and it's a breaking change.
Instead, the context.WithValue(...)
can be used to pass the values to the underlying state backend from the Limit()
method.
@leeym what do you think?
I feel that using context.WithValue(...)
will be a good alternative to make it work while keep it backward compatible.
Hello,
Looking at the
FixedWindowDynamoDB
(and probably the others as well), it would be great if thepartitionKey
could be passed as a parameter inIncrement
instead of as part of thestruct
.In highly concurrent scenarios, where multiple keys would need to be handled potentially at the same time, being able to re-use the same
FixedWindow
per table, and not per key, to increase multiple keys via the function call would be ideal.I didn't get a chance to look at the extent of how such a change would impact the library as a whole, for
FixedWindowDynamoDB
it does not look like a big change, although it would be a breaking change.