Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for init (0.16 sec)

  1. internal/s3select/json/reader.go

    }
    
    // syncReadCloser will wrap a readcloser and make it safe to call Close while
    // reads are running.
    type syncReadCloser struct {
    	rc io.ReadCloser
    	mu sync.Mutex
    }
    
    func (pr *syncReadCloser) Read(p []byte) (n int, err error) {
    	// This ensures that Close will block until Read has completed.
    	// This allows another goroutine to close the reader.
    	pr.mu.Lock()
    	defer pr.mu.Unlock()
    	if pr.rc == nil {
    		return 0, io.EOF
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 24 03:58:53 GMT 2022
    - 3K bytes
    - Viewed (0)
  2. internal/s3select/parquet/reader.go

    				// Only support UTC normalized timestamps.
    				if ts.IsAdjustedToUTC {
    					switch {
    					case ts.Unit.IsSetNANOS():
    						duration = time.Duration(val) * time.Nanosecond
    					case ts.Unit.IsSetMILLIS():
    						duration = time.Duration(val) * time.Millisecond
    					case ts.Unit.IsSetMICROS():
    						duration = time.Duration(val) * time.Microsecond
    					default:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  3. src/bytes/reader.go

    type Reader struct {
    	s        []byte
    	i        int64 // current reading index
    	prevRune int   // index of previous rune; or < 0
    }
    
    // Len returns the number of bytes of the unread portion of the
    // slice.
    func (r *Reader) Len() int {
    	if r.i >= int64(len(r.s)) {
    		return 0
    	}
    	return int(int64(len(r.s)) - r.i)
    }
    
    // Size returns the original length of the underlying byte slice.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. internal/bucket/bandwidth/reader.go

    }
    
    // MonitorReaderOptions provides configurable options for monitor reader implementation.
    type MonitorReaderOptions struct {
    	BucketOptions
    	HeaderSize int
    }
    
    // Read implements a throttled read
    func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  5. src/archive/zip/reader.go

    	if size < 0 {
    		return nil, errors.New("zip: size cannot be negative")
    	}
    	zr := new(Reader)
    	var err error
    	if err = zr.init(r, size); err != nil && err != ErrInsecurePath {
    		return nil, err
    	}
    	return zr, err
    }
    
    func (r *Reader) init(rdr io.ReaderAt, size int64) error {
    	end, baseOffset, err := readDirectoryEnd(rdr, size)
    	if err != nil {
    		return err
    	}
    	r.r = rdr
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  6. src/archive/tar/reader.go

    	if err := feedTokens(1); err != nil {
    		return nil, err
    	}
    	numEntries, err := strconv.ParseInt(nextToken(), 10, 0) // Intentionally parse as native int
    	if err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) {
    		return nil, ErrHeader
    	}
    
    	// Parse for all member entries.
    	// numEntries is trusted after this since a potential attacker must have
    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)
  7. internal/etag/reader.go

    // Write -  implement hash.Hash Write
    func (u UUIDHash) Write(p []byte) (n int, err error) {
    	return len(p), nil
    }
    
    // Sum -  implement md5.Sum
    func (u UUIDHash) Sum(b []byte) []byte {
    	return u.uuid
    }
    
    // Reset -  implement hash.Hash Reset
    func (u UUIDHash) Reset() {
    	return
    }
    
    // Size -  implement hash.Hash Size
    func (u UUIDHash) Size() int {
    	return len(u.uuid)
    }
    
    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)
  8. internal/s3select/simdj/reader.go

    // safeCloser will wrap a Reader as a ReadCloser.
    // It is safe to call Close while the reader is being used.
    type safeCloser struct {
    	closed uint32
    	r      io.Reader
    }
    
    func (s *safeCloser) Read(p []byte) (n int, err error) {
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	n, err = s.r.Read(p)
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	return n, err
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  9. internal/s3select/csv/reader.go

    	columnNames  []string         // names of columns
    	nameIndexMap map[string]int64 // name to column index
    	current      [][]string       // current block of results to be returned
    	recordsRead  int              // number of records read in current slice
    	input        chan *queueItem  // input for workers
    	queue        chan *queueItem  // output from workers in order
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. internal/hash/reader.go

    		return nil
    	}
    
    	r.contentHasher = cs.Type.Hasher()
    	if r.contentHasher == nil {
    		return ErrInvalidChecksum
    	}
    	return nil
    }
    
    func (r *Reader) Read(p []byte) (int, error) {
    	n, err := r.src.Read(p)
    	r.bytesRead += int64(n)
    	if r.sha256 != nil {
    		r.sha256.Write(p[:n])
    	}
    	if r.contentHasher != nil {
    		r.contentHasher.Write(p[:n])
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
Back to top