Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientGeneratorFunc ¶ added in v0.5.0
type ClientGeneratorFunc func() *fasthttp.HostClient
type Request ¶ added in v0.5.0
type Request struct {
// contains filtered or unexported fields
}
Request represents an HTTP request to be sent using the fasthttp client. It isn't thread-safe and should be used by a single goroutine.
type RequestGeneratorFunc ¶ added in v0.5.0
type Responses ¶
type Responses []*Response
func Run ¶
Run executes the main logic for processing requests based on the provided configuration. It first checks for an internet connection with a timeout context. If no connection is found, it returns an error. Then, it initializes clients based on the request configuration and releases the dodos. If the context is canceled and no responses are collected, it returns an interrupt error.
Parameters:
- ctx: The context for managing request lifecycle and cancellation.
- requestConfig: The configuration for the request, including timeout, proxies, and other settings.
Returns:
- Responses: A collection of responses from the executed requests.
- error: An error if the operation fails, such as no internet connection or an interrupt.
Click to show internal directories.
Click to hide internal directories.