Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient interface {
// Returns the result of an http request
//
// Parameters:
// req: HTTP request object
//
// Returns:
// http.Response: HTTP response object
// error : Any error that may have occurred
MakeRequest(req *http.Request) (*http.Response, error)
SetHTTPClient(client *http.Client)
HTTPClient() *http.Client
}
type HTTPJSON ¶ added in v1.18.0
type HTTPJSON struct {
Name string `toml:"name" deprecated:"1.3.0;use 'name_override', 'name_suffix', 'name_prefix' instead"`
Servers []string
Method string
TagKeys []string
ResponseTimeout config.Duration
Parameters map[string]string
Headers map[string]string
tls.ClientConfig
// contains filtered or unexported fields
}
HTTPJSON struct
func (*HTTPJSON) Description ¶ added in v1.18.0
func (*HTTPJSON) Gather ¶ added in v1.18.0
func (h *HTTPJSON) Gather(acc telegraf.Accumulator) error
Gathers data for all servers.
func (*HTTPJSON) SampleConfig ¶ added in v1.18.0
type RealHTTPClient ¶
type RealHTTPClient struct {
// contains filtered or unexported fields
}
func (*RealHTTPClient) HTTPClient ¶ added in v1.14.0
func (c *RealHTTPClient) HTTPClient() *http.Client
func (*RealHTTPClient) MakeRequest ¶
func (*RealHTTPClient) SetHTTPClient ¶ added in v1.14.0
func (c *RealHTTPClient) SetHTTPClient(client *http.Client)
Click to show internal directories.
Click to hide internal directories.