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

Correct signatures of Aggregator methods for type safety #7

Merged
merged 2 commits into from
Aug 29, 2018

Conversation

dvgica
Copy link
Owner

@dvgica dvgica commented Aug 29, 2018

Previously, the authData passed to the various user-facing GenericAggregator methods was useless - it was a non-specific type. This PR tweaks varies types and signatures to allow it to be specific. Now, implementors of the Aggregator class specify which AuthData type they expect to handle. If an Aggregator handling an incorrect type of AuthData (i.e. one that doesn't match authConfig.AuthData) is passed to aggregatorRoute and friends, a compilation error results.

As a bonus, the signatures of the user-facing methods are much simpler.

Needs a version bump before merging.

Copy link

@rwalbergpd rwalbergpd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes more sense. Thanks!

@dvgica dvgica merged commit c1ef847 into master Aug 29, 2018
@dvgica dvgica deleted the fix-aggregation-auth-data branch August 29, 2018 13:52
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