Commit Graph

11 Commits (main)

Author SHA1 Message Date
Giovanni Rivera b568915b70
📚 docs: Add Retry Addon documentation (#3330)
* 📚 Doc: Add addon tab to /docs

* 📚 Doc: Add retry to addon docs

* 📚 Doc: Update retry README.md

* 🎨 Styles: Update addon/retry docs to respect markdownlint-cli2

* 📚 Doc: Update addon tab description to be singular

* 📚 Doc: Use retry prefix in retry docs

* 📚 Doc: Add retry addon to whats_new.md

* 🎨 Styles: Update whats_new.md to respect markdownlint-cli2
2025-02-27 08:46:41 +01:00
Juan Calderon-Perez f668537c02
chore: Bump golangci-lint to v1.60.3 (#3119)
Bump golangci-lint to v1.60.3
2024-09-02 15:38:59 +02:00
Juan Calderon-Perez 8c3f81e2b7
v3: Use Named Fields Instead of Positional and Align Structures to Reduce Memory Usage (#3079)
* 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
2024-07-23 08:37:45 +02:00
Juan Calderon-Perez 9463a8f626
v3: Add support for consistent documentation using markdownlint (#3064)
* 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>
2024-07-11 15:21:56 +02:00
Juan Calderon-Perez 95c181469d
chore: Enabling shuffling, cleanup and consistency across tests (#2931)
* Make Test/Benchmark names consistent. Add Makefile for GoFiber developers

* Cleanup README and Makefile

* Update statement
2024-03-24 20:54:56 +01:00
nickajacks1 4c68e0242d
ci: address multiple lint rules (#2869)
* 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().
2024-02-19 14:33:10 +01:00
nickajacks1 a776d2933e
ci: re-enable tparallel linter (#2801)
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.
2024-01-17 09:47:26 +01:00
nickajacks1 f2e9c1f21d
🚨 Test: Speed up addon/retry tests (#2800)
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.
2024-01-15 11:18:39 +01:00
Muhammed Efe Çetin 41866cd3dd
👷 v3 (ci): fix some linter warnings 2023-03-06 17:35:39 +03:00
Trim21 c964fda009
v3(tests): use testify for assertion (#2036)
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
Gökhan Özeloğlu 4adda508b0
v3 (feature): add retry mechanism (#1972)
* 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>
2022-08-19 08:20:14 +02:00