Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for DrainBody (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. internal/rest/client.go

    			err = fmt.Errorf("Marking %s offline temporarily; caused by PreconditionFailed with drive ID mismatch", c.url.Host)
    			logger.LogOnceIf(ctx, logSubsys, err, c.url.Host)
    			c.MarkOffline(err)
    		}
    		defer xhttp.DrainBody(resp.Body)
    		// Limit the ReadAll(), just in case, because of a bug, the server responds with large data.
    		b, err := io.ReadAll(io.LimitReader(resp.Body, c.MaxErrResponseSize))
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  6. cmd/bucket-replication.go

    		Transport: globalRemoteTargetTransport,
    		Timeout:   10 * time.Second,
    	}
    
    	resp, err := client.Do(req)
    	if err != nil {
    		return err
    	}
    	if err == nil {
    		// Drain the connection.
    		xhttp.DrainBody(resp.Body)
    	}
    	if resp != nil {
    		amzid := resp.Header.Get(xhttp.AmzRequestHostID)
    		if _, ok := globalNodeNamesHex[amzid]; ok {
    			return BucketRemoteIdenticalToSource{
    				Endpoint: epURL.String(),
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  7. cmd/batch-handlers.go

    	}
    	req.Header.Set("Content-Type", "application/json")
    
    	clnt := http.Client{Transport: getRemoteInstanceTransport()}
    	resp, err := clnt.Do(req)
    	if err != nil {
    		return err
    	}
    
    	xhttp.DrainBody(resp.Body)
    	if resp.StatusCode != http.StatusOK {
    		return errors.New(resp.Status)
    	}
    
    	return nil
    }
    
    // Notify notifies notification endpoint if configured regarding job failure or success.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 55.2K bytes
    - Viewed (0)
Back to top