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

Support transaction-like resources #53

Closed
Primetalk opened this issue Aug 18, 2022 · 0 comments · Fixed by #79
Closed

Support transaction-like resources #53

Primetalk opened this issue Aug 18, 2022 · 0 comments · Fixed by #79
Assignees

Comments

@Primetalk
Copy link
Owner

Some resources require different action in case of failure. In particular, DB transactions and S3 multipart uploads.

t := transaction.New[T](acquire IO[T], rollback, commit func(T) IO) transaction.TransactionalResource[T]
transaction.Within[T, A](t, func (t) IO[A]) IO[A]
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 a pull request may close this issue.

1 participant