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

Use module pattern 2.0 (move requests to executor) #92

Closed
wants to merge 5 commits into from

Conversation

mvelimir
Copy link
Member

@mvelimir mvelimir commented Feb 9, 2023

No description provided.

@@ -46,14 +46,14 @@ object Main extends ZIOAppDefault {
val deleteIndex: RIO[ElasticExecutor, Unit] =
for {
_ <- ZIO.logInfo(s"Deleting index '$Index'...")
_ <- ElasticRequest.deleteIndex(Index).execute
_ <- ZIO.serviceWithZIO[ElasticExecutor](_.deleteIndex(Index).execute)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be great not having needing the call to execute as it makes the API usage awkward.

Copy link
Member Author

Choose a reason for hiding this comment

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

The only idea that comes to mind is an implicit conversion from ElasticRequest to ZIO.

@drmarjanovic
Copy link
Member

Closed in favour of #83

@drmarjanovic drmarjanovic deleted the module-pattern-2.0-2 branch February 22, 2023 15:26
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.

3 participants