kamilsk / retry Goto Github PK
View Code? Open in Web Editor NEW♻️ The most advanced interruptible mechanism to perform actions repetitively until successful.
Home Page: https://pkg.go.dev/github.com/kamilsk/retry/v5
License: MIT License
♻️ The most advanced interruptible mechanism to perform actions repetitively until successful.
Home Page: https://pkg.go.dev/github.com/kamilsk/retry/v5
License: MIT License
yaml, json, etc. - add helpers
use submodule
usage
$ go get bitbucket.org/kamilsk/retry
package bitbucket.org/kamilsk/retry: code in directory $GOPATH/src/bitbucket.org/kamilsk/retry expects import "github.com/kamilsk/retry"
blocked by #30
setup origin and mirror, sync with makefile from semaphore
because now this repo is not a fork
$ make cmd-test
go install -ldflags "-X 'main.Timeout=100ms'" ./cmd/retry
retry -limit=3 -backoff=lin[10ms] -timeout=500ms -- curl http://unknown.host
error occurred "context deadline exceeded"
curl: (7) Failed to connect to unknown.host port 80: Connection refused
$ make docker-gometalinter
docker run --rm \
-v '/Users/kamilsamigullin/Development/go/src/github.com/kamilsk/retrier':'/go/src/github.com/kamilsk/retrier' \
-w '/go/src/github.com/kamilsk/retrier' \
kamilsk/go-tools:latest \
/bin/sh -c 'go list ./... | grep -v /vendor/ | xargs go test -i "$1" && \
gometalinter.v1 --vendor --deadline=20s ./...'
retry.go:1:1:warning: package comment should be of the form "Package retrier ..." (golint)
jitter/jitter_test.go:9::warning: duplicate of jitter_test.go:29-47 (dupl)
jitter/jitter_test.go:29::warning: duplicate of jitter_test.go:9-27 (dupl)
strategy/extended_test.go:24:32:warning: error return value not checked (cannot use nil (untyped nil value) as parameter of type []Strategy) (errcheck)
strategy/extended_test.go:24:32:warning: unused global variable cannot use nil (untyped nil value) as parameter of type []Strategy (varcheck)
example_test.go:21:15:warning: error return value not checked (retrier.Retry(func(attempt uint) error {) (errcheck)
example_test.go:43:15:warning: error return value not checked (logFile.Chdir() // Do something with the file) (errcheck)
example_test.go:83:15:warning: error return value not checked (retrier.Retry() (errcheck)
example_test.go:98:11:warning: error return value not checked (rw.Write([]byte("Internal Server Error"))) (errcheck)
example_test.go:143:11:warning: error return value not checked (rw.Write([]byte("Internal Server Error"))) (errcheck)
make: *** [docker-tool-gometalinter] Error 1
conduct, templates, etc
blocked by https://github.com/kamilsk/shared/issues/26
Line 164 in 10c68b5
blocked by https://github.com/kamilsk/shared/issues/174
experiments with https://rakyll.org/style-packages/
The main problem is mirror: go get bitbucket... make library unportable
cmd/retry/flag/flag.go:59:6:warning: type name will be used as flag.FlagSet by other packages, and that stutters; considercalling this Set (golint)
cmd/retry/go17_helper.go:54::error: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak (vet)
cmd/retry/go17_helper.go:37:10:warning: error return value not checked (cl.Parse(os.Args[1:])) (errcheck)
diff:
cmd:
# github.com/kamilsk/retry/classifier
classifier/functional_test.go:43: unknown net.DNSError field 'IsTemporary' in struct literal
ok github.com/kamilsk/retry 1.113s
ok github.com/kamilsk/retry/backoff 1.010s
FAIL github.com/kamilsk/retry/classifier [build failed]
? github.com/kamilsk/retry/cmd/retry [no test files]
? github.com/kamilsk/retry/cmd/retry/flag [no test files]
ok github.com/kamilsk/retry/jitter 1.015s
ok github.com/kamilsk/retry/strategy 1.171s
make: *** [docker-test-1.5] Error 123
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.