Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ReadFileStream (0.24 sec)

  1. cmd/naughty-disk_test.go

    		return 0, err
    	}
    	return d.disk.ReadFile(ctx, volume, path, offset, buf, verifier)
    }
    
    func (d *naughtyDisk) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	if err := d.calcError(); err != nil {
    		return nil, err
    	}
    	return d.disk.ReadFileStream(ctx, volume, path, offset, length)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. cmd/bitrot-streaming.go

    		b.currOffset = offset
    		streamOffset := (offset/b.shardSize)*int64(b.h.Size()) + offset
    		if len(b.data) == 0 && b.tillOffset != streamOffset {
    			b.rc, err = b.disk.ReadFileStream(context.TODO(), b.volume, b.filePath, streamOffset, b.tillOffset-streamOffset)
    		} else {
    			b.rc = io.NewSectionReader(bytes.NewReader(b.data), streamOffset, b.tillOffset-streamOffset)
    		}
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 12:20:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. cmd/storage-interface.go

    	AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error)
    	CreateFile(ctx context.Context, origvolume, olume, path string, size int64, reader io.Reader) error
    	ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error)
    	RenameFile(ctx context.Context, srcVolume, srcPath, dstVolume, dstPath string) error
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. cmd/storage-rest-client.go

    		Volume:   volume,
    		FilePath: path,
    	})
    	if err != nil {
    		return nil, toStorageErr(err)
    	}
    
    	return *gridBytes, nil
    }
    
    // ReadFileStream - returns a reader for the requested file.
    func (client *storageRESTClient) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  5. cmd/mrf.go

    	localDrives := cloneDrives(globalLocalDrivesMap)
    	globalLocalDrivesMu.RUnlock()
    
    	for _, localDrive := range localDrives {
    		if localDrive == nil {
    			continue
    		}
    		rc, err := localDrive.ReadFileStream(context.Background(), minioMetaBucket, pathJoin(healMRFDir, "list.bin"), 0, -1)
    		if err != nil {
    			continue
    		}
    		err = loadMRF(rc, m.opCh)
    		if err != nil {
    			continue
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:26:05 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. cmd/erasure-encode_test.go

    func (a badDisk) String() string {
    	return "bad-disk"
    }
    
    func (a badDisk) AppendFile(ctx context.Context, volume string, path string, buf []byte) error {
    	return errFaultyDisk
    }
    
    func (a badDisk) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	return nil, errFaultyDisk
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  7. cmd/xl-storage-disk-id-check.go

    	if err != nil {
    		return err
    	}
    	defer done(size, &err)
    
    	return p.storage.CreateFile(ctx, origvolume, volume, path, size, io.NopCloser(reader))
    }
    
    func (p *xlStorageDiskIDCheck) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	ctx, done, err := p.TrackDiskHealth(ctx, storageMetricReadFileStream, volume, path)
    	if err != nil {
    		return nil, err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:56:26 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  8. cmd/storage-rest-server.go

    		return
    	}
    	length, err := strconv.ParseInt(r.Form.Get(storageRESTLength), 10, 64)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    	rc, err := s.getStorage().ReadFileStream(r.Context(), volume, filePath, offset, length)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	defer rc.Close()
    
    	_, err = xioutil.Copy(w, rc)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
  9. cmd/xl-storage.go

    		default:
    			return nil, err
    		}
    	}
    
    	return w, nil
    }
    
    type sendFileReader struct {
    	io.Reader
    	io.Closer
    }
    
    // ReadFileStream - Returns the read stream of the file.
    func (s *xlStorage) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	if offset < 0 {
    		return nil, errInvalidArgument
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 91.3K bytes
    - Viewed (0)
  10. cmd/erasure-server-pool.go

    				if err != nil {
    					continue
    				}
    				for _, si := range stats {
    					found++
    					var r io.ReadCloser
    					if !si.Dir {
    						r, err = disk.ReadFileStream(ctx, volume, si.Name, 0, si.Size)
    						if err != nil {
    							continue
    						}
    					} else {
    						r = io.NopCloser(bytes.NewBuffer([]byte{}))
    					}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 89.8K bytes
    - Viewed (0)
Back to top