- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for DrainBody (0.15 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/http/close.go
package http import ( "io" xioutil "github.com/minio/minio/internal/ioutil" ) // DrainBody close non nil response with any response Body. // convenient wrapper to drain any remaining data on response body. // // Subsequently this allows golang http RoundTripper // to reuse the same connection for future requests. func DrainBody(respBody io.ReadCloser) { // Callers should close resp.Body when done reading from it.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 1.7K 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) -
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()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Mar 06 16:56:10 UTC 2023 - 6.6K 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/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):
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 4K bytes - Viewed (0) -
internal/dsync/dsync-client_test.go
if err != nil { return false, err } body := bytes.NewReader(buf) respBody, err := restClient.rest.Call(context.Background(), method, url.Values{}, body, body.Size()) defer xhttp.DrainBody(respBody) switch toLockError(err) { case nil: return true, nil case errLockConflict, errLockNotFound: return false, nil default: return false, err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 20 17:36:09 UTC 2022 - 4.4K bytes - Viewed (0) -
internal/config/subnet/subnet.go
client := &http.Client{ Timeout: 10 * time.Second, Transport: c.transport, } resp, err := client.Do(r) if err != nil { return "", err } defer xhttp.DrainBody(resp.Body) respBytes, err := io.ReadAll(io.LimitReader(resp.Body, respBodyLimit)) if err != nil { return "", err } respStr := string(respBytes) if resp.StatusCode == http.StatusOK {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 27 16:35:36 UTC 2023 - 2.9K bytes - Viewed (0) -
internal/config/identity/openid/providercfg.go
} client := &http.Client{ Transport: transport, } resp, err := client.Do(req) if err != nil { return nil, err } defer xhttp.DrainBody(resp.Body) if resp.StatusCode != http.StatusOK { // uncomment this for debugging when needed. // reqBytes, _ := httputil.DumpRequest(req, false) // fmt.Println(string(reqBytes))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.6K bytes - Viewed (0)