- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for DrainBody (0.18 sec)
-
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) -
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) -
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) -
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) -
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) -
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 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Feb 27 16:35:36 GMT 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))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 4.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:
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) -
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) -
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 } }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 20 17:36:09 GMT 2022 - 4.4K bytes - Viewed (0)