Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
NewHTTPClient creates a new HTTP client with OpenTelemetry instrumentation and logging capabilities. If a tracer provider is configured, the client will automatically propagate trace context in requests.
Types ¶
type HttpClient ¶
type HttpClient interface {
Get(url string) (resp *http.Response, err error)
Do(req *http.Request) (*http.Response, error)
Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)
PostForm(url string, data url.Values) (resp *http.Response, err error)
Head(url string) (resp *http.Response, err error)
CloseIdleConnections()
}
HttpClient defines the interface for HTTP client operations with logging support.
func NewClient ¶
func NewClient() HttpClient
NewClient creates a new HttpClient implementation with default configuration and structured logging support.
Click to show internal directories.
Click to hide internal directories.