-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(processor): Implement a new structure for the processor #4420
base: master
Are you sure you want to change the base?
Conversation
@@ -3073,6 +3056,117 @@ impl Service for EnvelopeProcessorService { | |||
} | |||
} | |||
|
|||
#[cfg(feature = "processing")] | |||
fn enforce_quotas<'a, G: Group, P: GroupPayload<'a, G>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporarily duplicated, to make it work for both old and new processing mechanism.
match group { | ||
$( | ||
ProcessingGroup::$group => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it should be possible to do this dispatch directly with dynamic trait objects instead of an enum + macro.
This PR introduces a new processor structure, currently implemented for check-ins only.
The new structure has the following goals:
GroupPayload
abstraction, which abstracts away whether the function operates on theManagedEnvelope
and theEvent
or only theManagedEnvelope
.ProcessingGroup
->ProcessGroup
.Upcoming work:
groups
.ProcessingGroup
into the groups module in addition to other structs.