Files
cybertron-log-enricher/configs/http_config.go
Varnit Goyal f20af81520 Tp 55555/integrate document service client (#5)
* TP-55555 | document client and kafka integration

* TP-55555 | introduce service concept refactor code
2024-07-27 17:00:47 +05:30

18 lines
430 B
Go

package configs
import "github.com/spf13/viper"
type HttpConfig struct {
MaxIdleConnectionPool int
MaxConnection int
MaxTimeoutInSeconds int64
}
func NewHttpConfig() *HttpConfig {
return &HttpConfig{
MaxIdleConnectionPool: viper.GetInt("http.max.idle.connection.pool"),
MaxConnection: viper.GetInt("http.max.connection"),
MaxTimeoutInSeconds: viper.GetInt64("http.max.idle.timeout.seconds"),
}
}