package
0.1.5
Repository: https://github.com/detectify/nvdtools.git
Documentation: pkg.go.dev

# Functions

Default returns the default http client to use.
Get will create a GET request with given headers and call Do on the client.
Retry will only retry given statuses.
RetryAll is a RetryPolicy which retries all http statuses.
RetryNone is a RetryPolicy which doesn't retry anything.
StopOrContinue can help controlling the behaviour of concurrent GET requests when using an errgroup and encountering an error.
WithRetries will retry all given requests for the specified number of times - if status is 200, returns - if status is covered by the retry policy and hasn't been retried the total number of times, retry - otherwise, fail the request.
WithThrottling creates a rate limitted client - all requests are throttled.
WithUserAgent wrapps the given client in a way that it always makes requests with User Agent header.

# Structs

Config is used to configure a client.
Err encapsulates stuff from the http.Response.

# Interfaces

Client is an interface used for making http requests.

# Type aliases

FailedRetries is an error returned when all retries have been exhausted.
RetryPolicy is a function which returns true if HTTP status should be retried.