Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExponentialBackoff ¶
Exponential backoff algorithm
This algorithm calculates the wait time between retries based on the number of retries and a maximum backoff time.
The formula is:
wait_time = min(2^n + random_number_milliseconds, maximum_backoff)
where: n is the number of retries random_number_milliseconds is a random number between 0 and 50000 maximum_backoff is the maximum backoff time in milliseconds
func GetNextPageURL ¶
Helper function to get the next page URL from the "Link" header
Example of "Link" header: <https://api.github.com/repositories/1/commits?page=2>; rel="next", <https://api.github.com/repositories/1/commits?page=3>; rel="last"
func Paigenation ¶
Paigenation parses the page and size query parameters and returns the size and offset values.
If the page or size is not provided or invalid, it uses the default values (page=1, size=10).
func ValidateDate ¶
ValidateDate validates the date string and returns a valid RFC3339 date string.
If the date string is empty, it returns an empty string.
Types ¶
This section is empty.