forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pkg/queue] Add
StartConsumersWithFactory
function (jaegertracing#2714
) * [pkg/queue] Add `StartConsumersWithFactory` function This provides a way to keep state for each consumer of a bounded queue, which is useful in certain performance-critical setups. Fixes jaegertracing#2685. Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com> * Refactor bounded queue tests to extract common parts The common part with the assertions was moved to a new `checkQueue` function that is used by `TestBoundedQueue` and `TestBoundedQueueWithFactory`. Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com> * Use http.HandlerFunc pattern for getting a Consumer from a callback Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com> * Address review comment about unit tests Refactor unit tests using a `helper` function that takes a function to start consumers. Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
- Loading branch information
1 parent
183af3c
commit d1e9dc4
Showing
2 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters