Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 131 for Read (0.27 sec)

  1. src/archive/tar/reader.go

    //   - Exactly 0 bytes are read and EOF is hit.
    //   - Exactly 1 block of zeros is read and EOF is hit.
    //   - At least 2 blocks of zeros are read.
    func (tr *Reader) readHeader() (*Header, *block, error) {
    	// Two blocks of zero bytes marks the end of the archive.
    	if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil {
    		return nil, nil, err // EOF is okay here; exactly 0 bytes read
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  2. cmd/metrics-v3-system-process.go

    	processIORCharBytesMD             = NewCounterMD(processIORCharBytes, "Total bytes read by the process from the underlying storage system including cache, /proc/[pid]/io rchar")
    	processIOReadBytesMD              = NewCounterMD(processIOReadBytes, "Total bytes read by the process from the underlying storage system, /proc/[pid]/io read_bytes")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 16:07:23 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/ztunnelserver_test.go

    	setupLogging()
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	fixture := connect(ctx)
    	ztunClient := fixture.ztunClient
    	uid := fixture.uid
    	// read initial pod add
    	readRequest(t, ztunClient)
    	sendAck(ztunClient)
    	// read snapshot sent
    	m, fds := readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 0)
    	sent := m.Payload.(*zdsapi.WorkloadRequest_SnapshotSent).SnapshotSent
    	if sent == nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  4. src/bytes/buffer_test.go

    	// check not at EOF
    	b.WriteString("abcdefghijklmnopqrstuvwxyz")
    
    	// after unsuccessful read
    	if n, err := b.Read(nil); n != 0 || err != nil {
    		t.Fatalf("Read(nil) = %d,%v; want 0,nil", n, err)
    	}
    	if err := b.UnreadByte(); err == nil {
    		t.Fatal("UnreadByte after Read(nil): got no error")
    	}
    
    	// after successful read
    	if _, err := b.ReadBytes('m'); err != nil {
    		t.Fatalf("ReadBytes: %v", err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. internal/dsync/drwmutex.go

    	isReadLock := false
    	return dm.lockBlocking(ctx, cancel, id, source, isReadLock, opts)
    }
    
    // RLock holds a read lock on dm.
    //
    // If one or more read locks are already in use, it will grant another lock.
    // Otherwise the calling go routine blocks until the mutex is available.
    func (dm *DRWMutex) RLock(id, source string) {
    	isReadLock := true
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  6. cmd/erasure-decode.go

    	bufCount := 0
    	for _, b := range buf {
    		if len(b) > 0 {
    			bufCount++
    		}
    	}
    	return bufCount >= p.dataBlocks
    }
    
    // Read reads from readers in parallel. Returns p.dataBlocks number of bufs.
    func (p *parallelReader) Read(dst [][]byte) ([][]byte, error) {
    	newBuf := dst
    	if len(dst) != len(p.readers) {
    		newBuf = make([][]byte, len(p.readers))
    	} else {
    		for i := range newBuf {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  7. internal/grid/grid.go

    		internalByteBuffer.Put(&b)
    		return
    	}
    }
    
    // readAllInto reads from r and appends to b until an error or EOF and returns the data it read.
    // A successful call returns err == nil, not err == EOF. Because readAllInto is
    // defined to read from src until EOF, it does not treat an EOF from Read
    // as an error to be reported.
    func readAllInto(b []byte, r *wsutil.Reader) ([]byte, error) {
    	for {
    		if len(b) == cap(b) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 02 15:56:18 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  8. cmd/admin-handlers_test.go

    	}
    
    	// Add a few concurrent read locks to the mix
    	for i := 0; i < 50; i++ {
    		resource := fmt.Sprintf("bucket/get-object-%d", i)
    		lri := lockRequesterInfo{
    			Name:   resource,
    			UID:    mustGetUUID(),
    			Owner:  owners[i%len(owners)],
    			Quorum: 2,
    		}
    		lris = append(lris, lri)
    		locksHeld[resource] = append(locksHeld[resource], lri)
    		// concurrent read lock, same resource different uid
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  9. cmd/local-locker.go

    			err = fmt.Errorf("unlock attempted on a read locked entity: %s", resource)
    			continue
    		}
    		if ok {
    			reply = l.removeEntry(resource, args, &lri) || reply
    		}
    	}
    	return
    }
    
    // removeEntry based on the uid of the lock message, removes a single entry from the
    // lockRequesterInfo array or the whole array from the map (in case of a write lock
    // or last read lock)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. cmd/metrics-v3-system-drive.go

    		"Reads per second on a drive",
    		allDriveLabels...)
    	driveReadsKBPerSecMD = NewGaugeMD(driveReadsKBPerSec,
    		"Kilobytes read per second on a drive",
    		allDriveLabels...)
    	driveReadsAwaitMD = NewGaugeMD(driveReadsAwait,
    		"Average time for read requests served on a drive",
    		allDriveLabels...)
    	driveWritesPerSecMD = NewGaugeMD(driveWritesPerSec,
    		"Writes per second on a drive",
    		allDriveLabels...)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 7.8K bytes
    - Viewed (0)
Back to top