- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for DrainBody (0.18 sec)
-
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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (0) -
cmd/peer-rest-client.go
if err != nil { return err } defer xhttp.DrainBody(respBody) return nil } // CommitBinary - sends commit binary message to remote peers. func (client *peerRESTClient) CommitBinary(ctx context.Context) error { respBody, err := client.callWithContext(ctx, peerRESTMethodCommitBinary, nil, nil, -1) if err != nil { return err } defer xhttp.DrainBody(respBody) return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 26.1K bytes - Viewed (0) -
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 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 15K bytes - Viewed (0) -
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:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 30.1K bytes - Viewed (0) -
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),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 18.7K bytes - Viewed (0) -
cmd/prepare-storage.go
return err } // Indicate that the liveness check for a peer call req.Header.Set(xhttp.MinIOPeerCall, "true") resp, err := httpClient.Do(req) if err != nil { return err } xhttp.DrainBody(resp.Body) return nil } // connect to list of endpoints and load all Erasure disk formats, validate the formats are correct
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 11.1K bytes - Viewed (1) -
cmd/perf-tests.go
return } client := &http.Client{ Transport: globalRemoteTargetTransport, } resp, err := client.Do(req) if err != nil { result.Error = err.Error() return } defer xhttp.DrainBody(resp.Body) err = gob.NewDecoder(resp.Body).Decode(&result) // endpoint have been overwritten result.Endpoint = rp.String() if err != nil { result.Error = err.Error() } return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.8K bytes - Viewed (0) -
internal/logger/target/http/http.go
} resp, err := h.client.Do(req) if err != nil { return fmt.Errorf("%s returned '%w', please check your endpoint configuration", h.Endpoint(), err) } // Drain any response. xhttp.DrainBody(resp.Body) if resp.StatusCode >= 200 && resp.StatusCode <= 299 { // accepted HTTP status codes. return nil } else if resp.StatusCode == http.StatusForbidden {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 11 22:20:42 UTC 2024 - 15.6K bytes - Viewed (0) -
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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/batch-expire.go
req.Header.Set("Authorization", r.NotificationCfg.Token) } 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 } // Expire expires object versions which have already matched supplied filter conditions
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 18 17:59:03 UTC 2024 - 21.9K bytes - Viewed (0)