Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 165 for Read (0.19 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. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  3. 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 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. cmd/bitrot.go

    	defer xioutil.ODirectPoolSmall.Put(bufp)
    
    	for left > 0 {
    		// Read expected hash...
    		h.Reset()
    		n, err := io.ReadFull(r, hashBuf)
    		if err != nil {
    			// Read's failed for object with right size, file is corrupt.
    			return err
    		}
    		// Subtract hash length..
    		left -= int64(n)
    		if left < shardSize {
    			shardSize = left
    		}
    
    		read, err := io.CopyBuffer(h, io.LimitReader(r, shardSize), *bufp)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. 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 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K 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/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 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  9. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  10. cmd/storage-rest-server.go

    // the Close() function is called.
    type closeNotifier struct {
    	rc   io.ReadCloser
    	done chan struct{}
    }
    
    func (c *closeNotifier) Read(p []byte) (n int, err error) {
    	n, err = c.rc.Read(p)
    	if err != nil {
    		if c.done != nil {
    			xioutil.SafeClose(c.done)
    			c.done = nil
    		}
    	}
    	return n, err
    }
    
    func (c *closeNotifier) Close() error {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 44.3K bytes
    - Viewed (0)
Back to top