go-retry

MIT License

Stars
18
Committers
3
go-retry - v2.0.1 Latest Release

Published by shogo82148 4 months ago

What's Changed

Full Changelog: https://github.com/shogo82148/go-retry/compare/v2.0.0...v2.0.1

go-retry - v2.0.0

Published by shogo82148 4 months ago

BREAKING CHANGES

In v1, if an error implemented the Temporary() method,
the retry mechanism was modified to respect the result of the method.

In v2, the package doesn't check the Temporary() method.
The retry mechanism will proceed unless the error is marked as non-retryable by MarkPermanent.

If you want the same behavior as v1, you need to rewrite it as follows:

// v1 code
policy.Do(func() error {
    return DoSomething()
})

// v2 code
policy.Do(func() error {
    err := DoSomething()

    interface temporary {
        Temporary() bool
    }
    var tmp temporary
    if errors.As(err, &tmp) && !tmp.Temporary() {
        return retry.MarkPermanent(err)
    }
    return err
})

What's Changed

Full Changelog: https://github.com/shogo82148/go-retry/compare/v1.3.1...v2.0.0

go-retry - v1.3.1

Published by shogo82148 4 months ago

What's Changed

Full Changelog: https://github.com/shogo82148/go-retry/compare/v1.3.0...v1.3.1

go-retry - v1.3.0

Published by shogo82148 4 months ago

What's Changed

Full Changelog: https://github.com/shogo82148/go-retry/compare/v1.2.0...v1.3.0

go-retry - v1.2.0

Published by shogo82148 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/shogo82148/go-retry/compare/v1.1.1...v1.2.0

go-retry -

Published by shogo82148 about 3 years ago

  • Optimize memory allocation #13
go-retry - v1.1.0

Published by shogo82148 over 3 years ago

  • introduce Err method #11
  • add documents when negative values are passed #10
  • remove dependency to xerrors #7
go-retry - First Release

Published by shogo82148 about 5 years ago