Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 166 for Read (0.2 sec)

  1. internal/ioutil/read_file.go

    )
    
    // ReadFileWithFileInfo reads the named file and returns the contents.
    // A successful call returns err == nil, not err == EOF.
    // Because ReadFile reads the whole file, it does not treat an EOF from Read
    // as an error to be reported.
    func ReadFileWithFileInfo(name string) ([]byte, fs.FileInfo, error) {
    	f, err := OsOpenFile(name, readMode, 0o666)
    	if err != nil {
    		return nil, nil, err
    	}
    	defer f.Close()
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 09 18:17:51 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. internal/etag/reader.go

    		}
    	}
    	return &Reader{
    		src:      r,
    		md5:      md5.New(),
    		checksum: etag,
    	}
    }
    
    // Read reads up to len(p) bytes from the underlying
    // io.Reader as specified by the io.Reader interface.
    func (r *Reader) Read(p []byte) (int, error) {
    	n, err := r.src.Read(p)
    	r.readN += int64(n)
    	r.md5.Write(p[:n])
    
    	if err == io.EOF && len(r.checksum) != 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  5. cmd/perf-tests.go

    }
    
    type firstByteRecorder struct {
    	t *time.Time
    	r io.Reader
    }
    
    func (f *firstByteRecorder) Read(p []byte) (n int, err error) {
    	if f.t != nil || len(p) == 0 {
    		return f.r.Read(p)
    	}
    	// Read a single byte.
    	n, err = f.r.Read(p[:1])
    	if n > 0 {
    		t := time.Now()
    		f.t = &t
    	}
    	return n, err
    }
    
    // Runs the speedtest on local MinIO process.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. cmd/streaming-signature-v4.go

    var errChunkTooBig = errors.New("chunk too big: choose chunk size <= 16MiB")
    
    // newSignV4ChunkedReader returns a new s3ChunkedReader that translates the data read from r
    // out of HTTP "chunked" format before returning it.
    // The s3ChunkedReader returns io.EOF when the final 0-length chunk is read.
    //
    // NewChunkedReader is not needed by normal applications. The http package
    // automatically decodes chunking when reading response bodies.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  10. 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)
Back to top