7
0
gaore-common-sdk-go/sdk/config.go

24 lines
592 B
Go
Raw Normal View History

2020-08-03 20:48:58 +08:00
package sdk
import (
2020-08-04 21:14:06 +08:00
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
2020-08-03 20:48:58 +08:00
"net/http"
"time"
)
type Config struct {
2020-08-04 21:14:06 +08:00
Debug bool `default:"false"`
HttpTransport *http.Transport `default:""`
Transport http.RoundTripper `default:""`
GoRoutinePoolSize int `default:"0"`
UserAgent string `default:""`
Scheme string `default:"HTTP"`
Timeout time.Duration `default:"5"`
2020-08-03 20:48:58 +08:00
}
func NewConfig() *Config {
2020-08-04 21:14:06 +08:00
config := &Config{}
utils.InitStructWithDefaultTag(config)
return config
2020-08-03 20:48:58 +08:00
}