Description
Retry a function execution with specific intervals with panic recovery
Make sure to read the docs to understand how this package works and what do
expected from it. :)
Retry alternatives and similar packages
Based on the "Utilities" category.
Alternatively, view Retry alternatives based on common mentions on social networks and blogs.
-
xlsx
Library to simplify reading the XML format used by recent version of Microsoft Excel in Go programs. -
goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report. -
go-funk
A modern Go utility library which provides helpers (map, find, contains, filter, chunk, reverse, ...) -
mc
Minio Client provides minimal tools to work with Amazon S3 compatible cloud storage and filesystems. -
mergo
A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. -
beaver
Beaver is a real-time messaging server. With beaver you can easily build scalable in-app notifications, realtime graphs, multiplayer games, chat applications, geotracking and more in web applications and mobile apps. -
httpcontrol
Package httpcontrol allows for HTTP transport level control around timeouts and retries.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of Retry or a related project?
Popular Comparisons
README
Retry
Retry a function execution with specific intervals with panic recovery
Make sure to read the docs to understand how this package works and what do expected from it.
Installation
go get -u github.com/txgruppi/retry-go
Example
package main
import (
"log"
"time"
"github.com/txgruppi/retry-go"
)
func main() {
toTry := func(attempt, limit int) error {
// Do you stuff and return an error if there is any
return nil
}
err := retry.WithFixedInterval(1 * time.Second, 5, toTry)
if err != nil {
log.Fatal(err) // It should log the errors if there were any
}
}
Tests
go get -u -t github.com/txgruppi/retry-go
cd $GOPATH/src/github.com/txgruppi/retry-go
go test ./...
License
MIT
*Note that all licence references and agreements mentioned in the Retry README section above
are relevant to that project's source code only.