Files
houston-be/internal/clients/http_config.go
Abhijeet Gupta 810b314649 TP-0000 | Add tag condition for not resolved (#19)
* TP-0000 | Add tag condition for not resolved

* TP-0000 | archive uncomment

* TP-0000 | ping api

* TP-0000 | mjolnir
2023-04-20 23:19:10 +05:30

24 lines
468 B
Go

package clients
import (
"github.com/spf13/viper"
"net/http"
"time"
)
type HttpClient struct {
HttpClient *http.Client
}
func NewHttpClient() *HttpClient {
return &HttpClient{
HttpClient: &http.Client{
Transport: &http.Transport{
MaxIdleConns: viper.GetInt("http.max.idle.connection.pool"),
MaxConnsPerHost: viper.GetInt("http.max.connection"),
},
Timeout: time.Duration(viper.GetInt("http.max.timeout.seconds")) * time.Second,
},
}
}