Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple of things are going on here:
main
This is the http receiver. As such, I moved most of the receiving logic out into a receiving package. I added a test for the receiver to boot!
bucket
After explaining l2met internals to several folks, I found myself using a set of terms that seemed to resonate. The changes I made to the bucket code reflect these new terms and models. There now exists:
store
One of the great things to come out of these changes is that redis logic is isolated to store/redis_store. Also, the store is now an interface. Consequently, I implemented a MemStore that can be used in testing.
tests
I added receiver/receiver_test.go which not only tests the receiving path. But also highlights to how to the new code paths.
data flow
I have taken great care in not changing the how data flows in & out of l2met. I wanted to preserve all of the performance tuning that we have been doing.