Documentation
¶
Index ¶
- func GetHTTPClientCustomProxy(proxyURL string) (*http.Client, error)
- func GetHTTPClientCustomProxyWithTimeout(proxyURL string, timeout time.Duration) (*http.Client, error)
- func GetHTTPClientShortTimeout(useProxy bool) (*http.Client, error)
- func GetHTTPClientSystemProxy(useProxy bool) (*http.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHTTPClientCustomProxy ¶
GetHTTPClientCustomProxy returns a NEW http.Client every time (no reuse). proxyURL supports: http, https, socks, socks5
func GetHTTPClientCustomProxyWithTimeout ¶
func GetHTTPClientCustomProxyWithTimeout(proxyURL string, timeout time.Duration) (*http.Client, error)
GetHTTPClientCustomProxyWithTimeout returns a NEW http.Client with custom timeout. proxyURL supports: http, https, socks, socks5
func GetHTTPClientShortTimeout ¶
GetHTTPClientShortTimeout returns a cached http.Client with short timeout (30s). Used for background tasks like delay probing and model syncing to avoid goroutine/connection accumulation when endpoints are unreachable. - useProxy=false: bypass proxy - useProxy=true: use proxy settings from system/app settings
Types ¶
This section is empty.