Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 84 for ReadAll (0.08 sec)

  1. cmd/test-utils_test.go

    	if err != nil {
    		return nil, err
    	}
    
    	newChunkHdr := []byte(fmt.Sprintf("%s"+s3ChunkSignatureStr+"%s\r\n",
    		hexChunkSize, chunkSignature))
    	newChunk, err := io.ReadAll(bufReader)
    	if err != nil {
    		return nil, err
    	}
    	newReq := req
    	newReq.Body = io.NopCloser(
    		bytes.NewReader(bytes.Join([][]byte{newChunkHdr, newChunk[:len(newChunk)/2]},
    			[]byte(""))),
    	)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 77K bytes
    - Viewed (0)
  2. istioctl/pkg/proxystatus/proxystatus.go

    		if err != nil {
    			return nil, err
    		}
    	}
    	defer func() {
    		if err := file.Close(); err != nil {
    			log.Errorf("failed to close %s: %s", filename, err)
    		}
    	}()
    	data, err := io.ReadAll(file)
    	if err != nil {
    		return nil, err
    	}
    	return data, nil
    }
    
    func StableXdsStatusCommand(ctx cli.Context) *cobra.Command {
    	cmd := XdsStatusCommand(ctx)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. cmd/admin-handlers-users.go

    	ctx := r.Context()
    
    	objectAPI, _ := validateAdminReq(ctx, w, r, policy.AddUserToGroupAdminAction)
    	if objectAPI == nil {
    		return
    	}
    
    	data, err := io.ReadAll(r.Body)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    	var updReq madmin.GroupAddRemove
    	err = json.Unmarshal(data, &updReq)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 03 23:11:02 UTC 2024
    - 85.1K bytes
    - Viewed (0)
  4. docs/sts/assume-role.go

    	if sessionPolicyFile != "" {
    		var policy string
    		if f, err := os.Open(sessionPolicyFile); err != nil {
    			log.Fatalf("Unable to open session policy file: %v", err)
    		} else {
    			defer f.Close()
    			bs, err := io.ReadAll(f)
    			if err != nil {
    				log.Fatalf("Error reading session policy file: %v", err)
    			}
    			policy = string(bs)
    		}
    		stsOpts.Policy = policy
    	}
    	if expiryDuration != 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 17 01:24:54 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. cmd/erasure-healing_test.go

    	if err != nil {
    		t.Fatalf("Failed to getLatestFileInfo - %v", err)
    	}
    
    	part1Disk1Origin, err := firstDisk.ReadAll(context.Background(), bucket, pathJoin(object, fi.DataDir, "part.1"))
    	if err != nil {
    		t.Fatalf("Failed to read a file - %v", err)
    	}
    
    	part1Disk2Origin, err := secondDisk.ReadAll(context.Background(), bucket, pathJoin(object, fi.DataDir, "part.1"))
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 49K bytes
    - Viewed (0)
  6. cni/pkg/log/uds.go

    		}
    	}()
    
    	return nil
    }
    
    func (l *UDSLogger) handleLog(w http.ResponseWriter, req *http.Request) {
    	if req.Body == nil {
    		return
    	}
    	defer req.Body.Close()
    	data, err := io.ReadAll(req.Body)
    	if err != nil {
    		log.Errorf("Failed to read log report from cni plugin: %v", err)
    		return
    	}
    	l.processLog(data)
    }
    
    func (l *UDSLogger) processLog(body []byte) {
    	cniLogs := make([]string, 0)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jun 28 19:12:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. internal/http/response-recorder.go

    		if lrw.body.Len() > 1<<20 {
    			return gzippedBody
    		}
    		r, err := gzip.NewReader(&lrw.body)
    		if err != nil {
    			return gzippedBody
    		}
    		defer r.Close()
    		b, _ := io.ReadAll(io.LimitReader(r, 10<<20))
    		return b
    	}
    	// If there was an error response or body logging is enabled
    	// then we return the body contents
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. internal/rest/client.go

    			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 {
    			if xnet.IsNetworkOrHostDown(err, expectTimeouts) {
    				if !c.NoMetrics {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 12:55:01 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  9. cmd/storage-rest-client.go

    	}
    	defer xhttp.DrainBody(respBody)
    
    	dec := msgpNewReader(respBody)
    	defer readMsgpReaderPoolPut(dec)
    
    	err = rf.DecodeMsg(dec)
    	return rf, err
    }
    
    // ReadAll - reads all contents of a file.
    func (client *storageRESTClient) ReadAll(ctx context.Context, volume string, path string) ([]byte, error) {
    	ctx, cancel := context.WithTimeout(ctx, globalDriveConfig.GetMaxTimeout())
    	defer cancel()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  10. docs/debugging/inspect/main.go

    	// Parse parameters
    	switch {
    	case *stdin:
    		// Parse 'mc support inspect --json' output
    		input := struct {
    			File string `json:"file"`
    			Key  string `json:"key"`
    		}{}
    		got, err := io.ReadAll(os.Stdin)
    		if err != nil {
    			fatalErr(err)
    		}
    		fatalErr(json.Unmarshal(got, &input))
    		inputs = []string{input.File}
    		*keyHex = input.Key
    	case len(flag.Args()) == 1:
    		var err error
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top