Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 247 for Read (0.15 sec)

  1. cmd/os_other.go

    	d, err := Open(dirPath)
    	if err != nil {
    		if osErrToFileErr(err) == errFileNotFound {
    			return nil
    		}
    		return osErrToFileErr(err)
    	}
    	defer d.Close()
    
    	maxEntries := 1000
    	for {
    		// Read up to max number of entries.
    		fis, err := d.Readdir(maxEntries)
    		if err != nil {
    			if err == io.EOF {
    				break
    			}
    			err = osErrToFileErr(err)
    			if err == errFileNotFound {
    				return nil
    			}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 4K bytes
    - Viewed (0)
  2. internal/logger/target/kafka/kafka.go

    type Target struct {
    	status int32
    
    	totalMessages  int64
    	failedMessages int64
    
    	wg sync.WaitGroup
    
    	// Channel of log entries.
    	// Reading logCh must hold read lock on logChMu (to avoid read race)
    	// Sending a value on logCh must hold read lock on logChMu (to avoid closing)
    	logCh   chan interface{}
    	logChMu sync.RWMutex
    
    	// store to persist and replay the logs to the target
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.1K bytes
    - Viewed (1)
  3. cmd/local-locker_test.go

    				if testing.Short() && readers > 10 {
    					continue
    				}
    				t.Run(fmt.Sprintf("%d-read", readers), func(t *testing.T) {
    					l := newLocker()
    					for i := 0; i < locks; i++ {
    						var tmp [16]byte
    						rng.Read(tmp[:])
    						res := []string{hex.EncodeToString(tmp[:])}
    
    						for i := 0; i < readers; i++ {
    							rng.Read(tmp[:])
    							ok, err := l.RLock(context.Background(), dsync.LockArgs{
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  4. cmd/os-readdir_test.go

    type result struct {
    	dir     string
    	entries []string
    }
    
    // Test to read empty directory.
    func setupTestReadDirEmpty(t *testing.T) (testResults []result) {
    	// Add empty entry slice for this test directory.
    	testResults = append(testResults, result{t.TempDir(), []string{}})
    	return testResults
    }
    
    // Test to read non-empty directory with only files.
    func setupTestReadDirFiles(t *testing.T) (testResults []result) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  5. internal/s3select/csv/args.go

    	args.QuoteCharacter = defaultQuoteCharacter
    	args.QuoteEscapeCharacter = defaultQuoteEscapeCharacter
    	args.CommentCharacter = defaultCommentCharacter
    	args.AllowQuotedRecordDelimiter = false
    
    	for {
    		// Read tokens from the XML document in a stream.
    		t, err := d.Token()
    		if err != nil {
    			if err == io.EOF {
    				break
    			}
    			return err
    		}
    
    		if se, ok := t.(xml.StartElement); ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  6. internal/grid/benchmark_test.go

    				Embedded:  *req,
    			}, nil
    		}))
    		errFatal(err)
    	}
    	const payloadSize = 512
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    	payload := make([]byte, payloadSize)
    	_, err = rng.Read(payload)
    	errFatal(err)
    
    	// Wait for all to connect
    	// Parallel writes per server.
    	b.Run("bytes", func(b *testing.B) {
    		for par := 1; par <= 32; par *= 2 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  7. cmd/common-main.go

    	ctxt.Interface = ctx.String("interface")
    	ctxt.UserTimeout = ctx.Duration("conn-user-timeout")
    	ctxt.ConnReadDeadline = ctx.Duration("conn-read-deadline")
    	ctxt.ConnWriteDeadline = ctx.Duration("conn-write-deadline")
    	ctxt.ConnClientReadDeadline = ctx.Duration("conn-client-read-deadline")
    	ctxt.ConnClientWriteDeadline = ctx.Duration("conn-client-write-deadline")
    
    	ctxt.ShutdownTimeout = ctx.Duration("shutdown-timeout")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 00:34:45 GMT 2024
    - 35.5K bytes
    - Viewed (2)
  8. src/cmd/cgo/internal/swig/testdata/stdio/main.go

    	// as expected.
    	f := Fopen("main.go", "r")
    	if f.Swigcptr() == 0 {
    		fatal("fopen failed")
    	}
    	if Fgetc(f) != '/' || Fgetc(f) != '/' || Fgetc(f) != ' ' || Fgetc(f) != 'C' {
    		fatal("read unexpected characters")
    	}
    	if Fclose(f) != 0 {
    		fatal("fclose failed")
    	}
    
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 975 bytes
    - Viewed (0)
  9. cmd/bitrot-streaming.go

    	// sequent of operations:
    	// 1) pipe.Write()
    	// 2) pipe.Close()
    	// Now pipe.Close() can return before the data is read on the other end of the pipe and written to the disk
    	// Hence an immediate Read() on the file can return incorrect data.
    	if b.canClose != nil {
    		b.canClose.Wait()
    	}
    	return err
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  10. internal/disk/fdatasync_linux.go

    // (respectively, time of last access and time of last modification; see inode(7))
    // do not require flushing because they are not necessary for a subsequent data
    // read to be handled correctly. On the other hand, a change to the file size
    // (st_size, as made by say ftruncate(2)), would require a metadata flush.
    //
    // The aim of fdatasync() is to reduce disk activity for applications that
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 29 23:40:28 GMT 2021
    - 1.8K bytes
    - Viewed (0)
Back to top