func (pc *ProxyConfig) Set(newSettings proxyutils.Settings) error {
	pc.mu.Lock()
	defer pc.mu.Unlock()
	httpUrl, err := tolerantParse(newSettings.Http)
	if err != nil {
		return errors.Annotate(err, "http proxy")
	}
	httpsUrl, err := tolerantParse(newSettings.Https)
	if err != nil {
		return errors.Annotate(err, "https proxy")
	}
	pc.http = httpUrl
	pc.https = httpsUrl
	pc.noProxy = newSettings.FullNoProxy()
	return nil
}
// Set updates the stored settings to the new ones passed in.
Set updates the stored settings to the new ones passed in.
// Set updates the stored settings to the new ones passed in .
func (pc *ProxyConfig) Set(newSettings proxyutils.Settings) error {
	pc.mu.Lock()
	defer pc.mu.Unlock()
	httpUrl, err := tolerantParse(newSettings.Http)
	if err != nil {
		return errors.Annotate(err, "http proxy")
	}
	httpsUrl, err := tolerantParse(newSettings.Https)
	if err != nil {
		return errors.Annotate(err, "https proxy")
	}
	pc.http = httpUrl
	pc.https = httpsUrl
	pc.noProxy = newSettings.FullNoProxy()
	return nil
}
func ( pc * ProxyConfig ) Set ( newSettings proxyutils . Settings ) error { pc . mu . Lock ( ) defer pc . mu . Unlock ( ) httpUrl , err := tolerantParse ( newSettings . Http ) if err != nil { return errors . Annotate ( err , " " ) } httpsUrl , err := tolerantParse ( newSettings . Https ) if err != nil { return errors . Annotate ( err , " " ) } pc . http = httpUrl pc . https = httpsUrl pc . noProxy = newSettings . FullNoProxy ( ) return nil }
Set updates the stored settings to the new ones passed in.
Set updates the stored settings to the new ones passed in .