ExHammer / hammer

An Elixir rate-limiter with pluggable backends
https://hexdocs.pm/hammer/
MIT License
749 stars 42 forks source link

Hammer.Backend.ETS without GenServer.call/3 #41

Closed robmadole closed 2 years ago

robmadole commented 4 years ago

ExHammer/hammer/issues/33


Why did the ets_table_name become a module attribute?

This was being grabbed from the GenServer state. Because these functions are no longer going through GenServer.call/3 that state is not present. It wouldn't be too difficult to use Application.get_env/3 to pull the config but that is yet another call to ets. I started to wonder if that was worth it.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.9%) to 70.886% when pulling a60f599a1d5e61e0a2f4ef588cff52ff490edc09 on robmadole:unwrapped-ets into b2cf18dd66bbd2b1f2a6d8e5350b4585b4d51bce on ExHammer:master.

ryanwinchester commented 4 years ago

I think it would be nice to make the read and write concurrency configurable, too?

;)

epinault commented 2 years ago

merged in 6.1