Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRequester ¶
type HTTPRequester interface {
SendRequest(m *config.MetricsConfig, timeout time.Duration) (*http.Response, error)
}
HTTPRequester is an interface for sending HTTP requests, useful for mocking in tests
type Requester ¶
Requester is the struct that contains the request information.
func NewRequester ¶
NewRequester creates a new Requester struct.
func (*Requester) SendRequest ¶
func (r *Requester) SendRequest(m *config.MetricsConfig, timeout time.Duration) (*http.Response, error)
SendRequest sends the request to the given endpoint.
Click to show internal directories.
Click to hide internal directories.