Files
cybertron/configs/http_config.go

18 lines
430 B
Go
Raw Permalink Normal View History

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"),
}
}