Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ReadFile (0.18 sec)

  1. cmd/xl-storage.go

    // tries to verify whether the disk has bitrot.
    //
    // Additionally ReadFile also starts reading from an offset. ReadFile
    // semantics are same as io.ReadFull.
    func (s *xlStorage) ReadFile(ctx context.Context, volume string, path string, offset int64, buffer []byte, verifier *BitrotVerifier) (int64, error) {
    	if offset < 0 {
    		return 0, errInvalidArgument
    	}
    
    	volumeDir, err := s.getVolDir(volume)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  2. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    	debug, err := extractZtunnelConfigDump(kubeClient, podName, podNamespace)
    	if err != nil {
    		return nil, err
    	}
    	return setupConfigdumpZtunnelConfigWriter(debug, out)
    }
    
    func readFile(filename string) ([]byte, error) {
    	file := os.Stdin
    	if filename != "-" {
    		var err error
    		file, err = os.Open(filename)
    		if err != nil {
    			return nil, err
    		}
    	}
    	defer func() {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 13:11:40 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    	respBody, err := client.call(ctx, storageRESTMethodReadFileStream, values, nil, -1)
    	if err != nil {
    		return nil, err
    	}
    	return respBody, nil
    }
    
    // ReadFile - reads section of a file.
    func (client *storageRESTClient) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (int64, error) {
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  4. cmd/xl-storage-disk-id-check.go

    		return nil, err
    	}
    	defer done(&err)
    
    	return p.storage.ListDir(ctx, origvolume, volume, dirPath, count)
    }
    
    // Legacy API - does not have any deadlines
    func (p *xlStorageDiskIDCheck) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) {
    	ctx, done, err := p.TrackDiskHealth(ctx, storageMetricReadFile, volume, path)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  5. cmd/storage-rest-server.go

    		}
    		verifier = NewBitrotVerifier(BitrotAlgorithmFromString(r.Form.Get(storageRESTBitrotAlgo)), hash)
    	}
    	buf := make([]byte, length)
    	defer metaDataPoolPut(buf) // Reuse if we can.
    	_, err = s.getStorage().ReadFile(r.Context(), volume, filePath, int64(offset), buf, verifier)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	w.Header().Set(xhttp.ContentLength, strconv.Itoa(len(buf)))
    	w.Write(buf)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
Back to top