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

Remove NIOLockedValueBox from EndpointPath #455

Closed
wants to merge 2 commits into from

Conversation

Joannis
Copy link
Contributor

@Joannis Joannis commented May 19, 2024

It's not needed (anymore) because we expect the entire context setup to be value types

@Joannis Joannis requested a review from adam-fowler May 19, 2024 20:18
@adam-fowler
Copy link
Member

You should run tests before, committing stuff. This is needed at the moment as the router path is resolved after middleware are run in the HummingbirdRouter. So the endpoint needs to be a reference. An alternative optimisation would be to add a protocol

protocol EndpointRequestContext {
    let endpoint: Endpoint
}

and require that the tracing and metrics middleware are only available when the request context conforms to this protocol. They are the only times the endpoint is needed

@Joannis
Copy link
Contributor Author

Joannis commented May 20, 2024

Ah I forgot about HummingbirdRouter, sorry!

@Joannis Joannis closed this May 20, 2024
@Joannis Joannis deleted the jo/remove-lock-from-endpointpath branch May 20, 2024 18:22
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.

None yet

2 participants