Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for DrainBody (0.18 sec)

  1. internal/config/dns/operator_dns.go

    		return newError(bucket, err)
    	}
    
    	resp, err := c.httpClient.Do(req)
    	if err != nil {
    		if derr := c.Delete(bucket); derr != nil {
    			return newError(bucket, derr)
    		}
    		return err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode != http.StatusOK {
    		var errorStringBuilder strings.Builder
    		io.Copy(&errorStringBuilder, io.LimitReader(resp.Body, resp.ContentLength))
    		errorString := errorStringBuilder.String()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  2. cmd/storage-rest-client.go

    	values.Set(storageRESTVolume, volume)
    	values.Set(storageRESTFilePath, path)
    	reader := bytes.NewReader(buf)
    	respBody, err := client.call(ctx, storageRESTMethodAppendFile, values, reader, -1)
    	defer xhttp.DrainBody(respBody)
    	return err
    }
    
    func (client *storageRESTClient) CreateFile(ctx context.Context, origvolume, volume, path string, size int64, reader io.Reader) error {
    	values := make(url.Values)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  3. cmd/peer-rest-client.go

    	if err != nil {
    		return err
    	}
    	defer xhttp.DrainBody(respBody)
    	return nil
    }
    
    // DownloadProfileData - download profiled data from a remote node.
    func (client *peerRESTClient) DownloadProfileData() (data map[string][]byte, err error) {
    	respBody, err := client.call(peerRESTMethodDownloadProfilingData, nil, nil, -1)
    	if err != nil {
    		return
    	}
    	defer xhttp.DrainBody(respBody)
    	err = gob.NewDecoder(respBody).Decode(&data)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  4. cmd/update.go

    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    fmt.Sprintf("No response from server to download URL %s", u),
    			StatusCode: http.StatusInternalServerError,
    		}
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode != http.StatusOK {
    		return content, AdminError{
    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  5. internal/event/target/elasticsearch.go

    		return false, store.ErrNotConnected
    	}
    	xhttp.DrainBody(resp.Body)
    	return !resp.IsError(), nil
    }
    
    func (c *esClientV7) entryExists(ctx context.Context, index string, key string) (bool, error) {
    	res, err := c.Exists(
    		index,
    		key,
    		c.Exists.WithContext(ctx),
    	)
    	if err != nil {
    		return false, err
    	}
    	xhttp.DrainBody(res.Body)
    	return !res.IsError(), nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 15K bytes
    - Viewed (0)
  6. internal/event/target/webhook.go

    	}
    
    	req.Header.Set("Content-Type", "application/json")
    
    	resp, err := target.httpClient.Do(req)
    	if err != nil {
    		return err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode < 200 || resp.StatusCode > 299 {
    		return fmt.Errorf("sending event failed with %v", resp.Status)
    	}
    
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 20 22:40:07 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  7. internal/config/cache/cache.go

    	if err != nil {
    		return nil, err
    	}
    
    	resp, err := c.clnt.Do(req)
    	if err != nil {
    		return nil, err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusNotFound:
    		return nil, ErrKeyMissing
    	case http.StatusOK:
    		co := &ObjectInfo{}
    		return co, co.DecodeMsg(msgp.NewReader(resp.Body))
    	default:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. cmd/iam.go

    		NewHTTPTransport(), xhttp.DrainBody, globalSite.Region)
    	if err != nil {
    		iamLogIf(ctx, fmt.Errorf("Unable to initialize AuthNPlugin: %w", err), logger.WarningKind)
    	}
    
    	setGlobalAuthNPlugin(idplugin.New(GlobalContext, authNPluginCfg))
    
    	authZPluginCfg, err := polplugin.LookupConfig(s, GetDefaultConnSettings(), xhttp.DrainBody)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  9. cmd/config-current.go

    	case config.PolicyPluginSubSys:
    		if ppargs, err := polplugin.LookupConfig(s, GetDefaultConnSettings(), xhttp.DrainBody); err != nil {
    			return err
    		} else if ppargs.URL == nil {
    			// Check if legacy opa is configured.
    			if _, err := opa.LookupConfig(s[config.PolicyOPASubSys][config.Default],
    				NewHTTPTransport(), xhttp.DrainBody); err != nil {
    				return err
    			}
    		}
    	case config.BrowserSubSys:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 30.8K bytes
    - Viewed (0)
  10. cmd/warm-backend.go

    	if err != nil {
    		if _, ok := err.(BackendDown); ok {
    			return err
    		}
    		return tierPermErr{
    			Op:  tierPut,
    			Err: err,
    		}
    	}
    
    	r, err := w.Get(ctx, probeObject, "", WarmBackendGetOpts{})
    	xhttp.DrainBody(r)
    	if err != nil {
    		if _, ok := err.(BackendDown); ok {
    			return err
    		}
    		switch {
    		case isErrBucketNotFound(err):
    			return errTierBucketNotFound
    		case isErrSignatureDoesNotMatch(err):
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top