* Use composites for internal structures. Fix alignment of structures across Fiber
* Update struct alignment in test files
* Enable alignment check with govet
* Fix ctx autoformat unit-test
* Revert app Config struct. Add betteralign to Makefile
* Disable comment on alert since it wont work for forks
* Update benchmark.yml
* Update benchmark.yml
* Remove warning from using positional fields
* Update router.go
* Add support for consistent documentation using markdownlint
* Only run workflow during changes to markdown files
* Fix more inconsistencies
* Fixes to markdown under .github/
* More fixes
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Fix typo in limiter docs
* Add missing space before code-block
* Add check for dead-links
* Add write-good
* Remove legacy README files
* Fix glob for skipping .md files
* Use paths-ignore instead
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* ci: explicitly disable tagalign
Tagalign requires awkward manual formatting and doesn't provide much
value for readability.
* ci: enable mirror linter
mirror warns against certain cases of useless conversion between string
and []byte.
* ci: enable perfsprint linter
This linter encourages replacing several functions from the fmt package
with faster alternatives. While fixing issues, I also added a few
exported error types rather than returning a naked errors.New().
In some cases, loop variables had to be reassigned to a local variable
to avoid concurrent access. This will no longer be needed when fiber's
minimum go version is bumped to 1.22, where each loop iteration gets its
own variable.
There was a test that used the default exponential backoff
configuration, causing the test to run for over 3 minutes. This test
does not increase coverage in a way that warrants the slowdown of CI,
and the default backoff time values are already verified by a separate
test.
* v3-retry-mechanism: Add retry mechanism
* General logic is implemented.
* Unit tests are added.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Refactor test assertion
* Replaced testify/assert with fiber's assert.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add test for next method
* currentInterval bug is fixed in Retry.
* If condition is fixed in next.
* struct definition refactored and if condtion is removed in TestExponentialBackoff_Retry.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add config for retry.
* Constant variables are removed.
* Helper function is added for default.
* Helper function is used in New function.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Replace math/rand with crypto/rand
* Random number generation package has been replaced with more secure one,
crypto/rand.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add a README for retry middleware
* Explanation and examples are added.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add comment line for documentation
* Comment lines are added for ExponentialBackoff variables.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Run go mod tidy
* Unused package(s) removed.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* move middleware -> addon
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>