Ecosyste.ms: Repos
An open API service providing repository metadata for many open source software ecosystems.
Package Usage: go: github.com/mightyguava/autotx
Package autotx provides wrappers for managing the lifecycle of a transaction and handling retries.
With the raw sql library, a transactional operation looks something like
It can get repetitive and be easy to forget to call Rollback on every error. Also, in this example,
panics are not handled, and the error from Rollback is discarded.
Using the The Transact function wraps the transactional operation, committing on completion, or rolling back the
transaction on error or panic. This can simplify operations significantly. The operation above would look like
The TransactWithRetry function behaves identically like the Transact function, but will retry errors returned
by the operation according to policies defined in autotx.RetryOptions{}.
2 versions
Latest release: over 3 years ago
1 dependent package
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/mightyguava/autotx
View more repository details: https://repos.ecosyste.ms/hosts/GitHub/repositories/mightyguava%2Fautotx
Dependent Repos 3
isabella232/cloner Fork of cashapp/cloner
- v0.1.1 go.mod
- v0.1.1 go.sum
Size: 5.57 MB - Last synced: about 1 year ago - Pushed: almost 2 years ago
cashapp/cloner
- v0.1.1 go.mod
- v0.1.1 go.sum
Size: 21.4 MB - Last synced: about 1 month ago - Pushed: 2 months ago
mightyguava/autotx
Golang transaction wrapper that supports rollback and retry on error- v0.0.0-00010101000000-000000000000 tests/go.mod
Size: 13.7 KB - Last synced: 5 months ago - Pushed: over 3 years ago
yyuan-squareup/cloner Fork of cashapp/cloner
- v0.1.1 go.mod
- v0.1.1 go.sum
Size: 21.6 MB - Last synced: about 1 month ago - Pushed: 11 months ago