mirror of
https://github.com/elyby/chrly.git
synced 2024-12-24 22:19:51 +05:30
19 lines
317 B
Go
19 lines
317 B
Go
package di
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/defval/di"
|
|
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
|
)
|
|
|
|
var httpClientDiOptions = di.Options(
|
|
di.Provide(newHttpClient),
|
|
)
|
|
|
|
func newHttpClient() *http.Client {
|
|
return &http.Client{
|
|
Transport: otelhttp.NewTransport(http.DefaultTransport),
|
|
}
|
|
}
|