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

Adds Handlers constructs and functions #1522

Merged
merged 7 commits into from
May 16, 2024
Merged

Adds Handlers constructs and functions #1522

merged 7 commits into from
May 16, 2024

Conversation

Baccata
Copy link
Contributor

@Baccata Baccata commented May 15, 2024

This adds functionality to facilitate the decoupled implementation of individual operations. Using these constructs allow to split the dependencies needed for the implementation of each operation, and move the coupling closer to the "end-of-the-world".

PR Checklist (not all items are relevant to all PRs)

  • Added unit-tests (for runtime code)
  • Added documentation
  • Updated changelog

This adds functionality to facilitate the decoupled implementation of
individual operations. Using these constructs allow to split the
dependencies needed for the implementation of each operation, and
move the coupling closer to the "end-of-the-world".
@Baccata Baccata requested a review from kubukoz May 15, 2024 14:38
): AsService[Alg, F] =
new EndpointHandler.AsServiceImpl[Alg, Op, F](this, service)

final def orElse(other: EndpointHandler[Op, F]): EndpointHandler[Op, F] =
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: orElse is used in cats/CE for error handling and could be confusing, perhaps we can find a name that isn't, e.g. just or?

other ideas off the top of my head: merge, add, combine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

modules/core/src/smithy4s/EndpointHandler.scala Outdated Show resolved Hide resolved
@kubukoz
Copy link
Member

kubukoz commented May 15, 2024

I like that this is lightweight on changes to existing code

Baccata and others added 2 commits May 16, 2024 14:23
@kubukoz kubukoz merged commit 3a49705 into series/0.18 May 16, 2024
11 checks passed
@kubukoz kubukoz deleted the handlers branch May 16, 2024 18:41
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