Set api client token statically, unrestrict client dynamically and download client nothing
This commit is contained in:
@@ -61,8 +61,8 @@ func MainApp(configPath string) {
|
||||
proxyURL = os.Getenv("PROXY")
|
||||
}
|
||||
|
||||
repoClient4 := http.NewHTTPClient(0, 1, false, []string{}, proxyURL, log.Named("network_test"))
|
||||
repoClient6 := http.NewHTTPClient(0, 1, true, []string{}, proxyURL, log.Named("network_test"))
|
||||
repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, proxyURL, log.Named("network_test"))
|
||||
repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, proxyURL, log.Named("network_test"))
|
||||
repo := http.NewIPRepository(repoClient4, repoClient6, "", log.Named("network_test"))
|
||||
|
||||
var hosts []string
|
||||
@@ -84,6 +84,7 @@ func MainApp(configPath string) {
|
||||
}
|
||||
|
||||
apiClient := http.NewHTTPClient(
|
||||
config.GetToken(),
|
||||
config.GetRetriesUntilFailed(), // default retries = 2
|
||||
config.GetApiTimeoutSecs(), // default api timeout = 60
|
||||
false, // no need for ipv6 support
|
||||
@@ -93,6 +94,7 @@ func MainApp(configPath string) {
|
||||
)
|
||||
|
||||
unrestrictClient := http.NewHTTPClient(
|
||||
"",
|
||||
config.GetRetriesUntilFailed(), // default retries = 2
|
||||
config.GetDownloadTimeoutSecs(), // default download timeout = 10
|
||||
false, // no need for ipv6 support
|
||||
@@ -102,6 +104,7 @@ func MainApp(configPath string) {
|
||||
)
|
||||
|
||||
downloadClient := http.NewHTTPClient(
|
||||
"",
|
||||
config.GetRetriesUntilFailed(),
|
||||
config.GetDownloadTimeoutSecs(),
|
||||
config.ShouldForceIPv6(),
|
||||
|
||||
Reference in New Issue
Block a user