Skip to content
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

refactor(s2n-quic-dc): put map impl behind trait #2361

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Oct 30, 2024

Description of changes:

This change puts the path secret map behind a trait. This is needed to keep the type concrete while still including a event::Subscriber. My goal was to keep any dyns we have as high up in the tree as possible to maximize the information the compiler has. With this, it can remove functions that aren't subscribed to, or at least inline them to be inexpensive.

Call-outs:

I've spent some time splitting up the map.rs module into various submodules. It was getting quite large and no interfaces were really being enforced so there was quite a bit of refactoring involved.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft marked this pull request as ready for review October 30, 2024 03:56
@Mark-Simulacrum
Copy link
Collaborator

This is needed to keep the type concrete while still including a Subscriber

Say more about this? It looks like in #2362 we're making the type Store<S> anyway? Is the plan to pass around Arc<dyn Store> or something like that?

It's not obvious to me that is the better option vs. Arc<dyn Subscriber> (not sure if we have any type aliases on it, but seems like we could build an erased subscriber if needed).

@camshaft camshaft merged commit afc56cd into main Oct 31, 2024
130 checks passed
@camshaft camshaft deleted the camshaft/dc-map-refactor branch October 31, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants