* TP-55555 | document client and kafka integration * TP-55555 | introduce service concept refactor code
18 lines
430 B
Go
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"),
|
|
}
|
|
}
|