Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ramdisk (0.04 sec)

  1. cmd/erasure-encode_test.go

    	"context"
    	"crypto/rand"
    	"io"
    	"testing"
    
    	"github.com/dustin/go-humanize"
    )
    
    type badDisk struct{ StorageAPI }
    
    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) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. cmd/erasure-heal_test.go

    		}
    		for j := 0; j < test.badDisks; j++ {
    			switch r := readers[test.offDisks+j].(type) {
    			case *streamingBitrotReader:
    				r.disk = badDisk{nil}
    			case *wholeBitrotReader:
    				r.disk = badDisk{nil}
    			}
    		}
    		for j := 0; j < test.badStaleDisks; j++ {
    			staleDisks[j] = badDisk{nil}
    		}
    
    		staleWriters := make([]io.Writer, len(staleDisks))
    		for i, disk := range staleDisks {
    			if disk == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. cmd/erasure-decode_test.go

    			for j := range disks[:test.offDisks] {
    				if bitrotReaders[j] == nil {
    					continue
    				}
    				switch r := bitrotReaders[j].(type) {
    				case *wholeBitrotReader:
    					r.disk = badDisk{nil}
    				case *streamingBitrotReader:
    					r.disk = badDisk{nil}
    				}
    			}
    			if test.offDisks > 0 {
    				bitrotReaders[0] = nil
    			}
    			writer.Reset()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top