-
Notifications
You must be signed in to change notification settings - Fork 74
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
Conversation
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".
): AsService[Alg, F] = | ||
new EndpointHandler.AsServiceImpl[Alg, Op, F](this, service) | ||
|
||
final def orElse(other: EndpointHandler[Op, F]): EndpointHandler[Op, F] = |
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.
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
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 like that this is lightweight on changes to existing code |
Co-authored-by: Jakub Kozłowski <kubukoz@gmail.com>
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)