Skip to content

menefotto/funcmiddleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This two packages implement two super simple functions:

  • Package limiter does what is says, it wraps a function and runs it, limiting the number of goroutunes that can be run at the same time ( number can be toogle with a simple exposed variable ).

  • Package retry does what is says as well if a function calls fails ( resulting in a error rather than a nil value ), runs is again. As arguments takes also the number of retries and a sleep value specified in milliseconds.

The package limiter in basically a shameless copy from this golang talk, all the credits go to the guy https://www.youtube.com/watch?v=yeetIgNeIkc. Tough I am almost sure I am going to rewrite it in a near future. This is what a call nice to have middleware.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages