Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for discord (0.18 sec)

  1. internal/ioutil/discard.go

    import (
    	"io"
    )
    
    // Discard is just like io.Discard without the io.ReaderFrom compatible
    // implementation which is buggy on NUMA systems, we have to use a simpler
    // io.Writer implementation alone avoids also unnecessary buffer copies,
    // and as such incurred latencies.
    var Discard io.Writer = discard{}
    
    // discard is /dev/null for Golang.
    type discard struct{}
    
    func (discard) Write(p []byte) (int, error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. internal/bpool/bpool.go

    func (bp *BytePoolCap) Put(b []byte) {
    	if bp == nil {
    		return
    	}
    	select {
    	case bp.c <- b:
    		// buffer went back into pool
    	default:
    		// buffer didn't go back into pool, just discard
    	}
    }
    
    // Width returns the width of the byte arrays in this pool.
    func (bp *BytePoolCap) Width() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.w
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. cmd/metacache-entries.go

    					continue
    				}
    				xl2, err := other.xlmeta()
    				if err != nil {
    					if err := selectFrom(idx); err != nil {
    						return err
    					}
    					continue
    				}
    				if xl == nil {
    					// Discard current "best"
    					if err := selectFrom(bestIdx); err != nil {
    						return err
    					}
    					bestIdx = idx
    					best = other
    					xl = xl2
    				} else {
    					// Mark read, unless we added it as new "best".
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	for m := range re {
    		if err := enc.Encode(m); err != nil {
    			s.writeErrorResponse(w, errors.New("Encoding mrf failed: "+err.Error()))
    			return
    		}
    	}
    }
    
    // DevNull - everything goes to io.Discard
    func (s *peerRESTServer) DevNull(w http.ResponseWriter, r *http.Request) {
    	if !s.IsValid(w, r) {
    		s.writeErrorResponse(w, errors.New("invalid request"))
    		return
    	}
    
    	globalNetPerfRX.Connect()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  5. cmd/admin-heal-ops.go

    			// unconsumedTimer fires.
    			select {
    			// Check after a second
    			case <-time.After(time.Second):
    				h.mutex.Unlock()
    				continue
    
    			case <-h.ctx.Done():
    				h.mutex.Unlock()
    				// discard result and return.
    				return errHealStopSignalled
    
    			// Timeout if no results consumed for too long.
    			case <-unconsumedTimer.C:
    				h.mutex.Unlock()
    				return errHealIdleTimeout
    			}
    		}
    		break
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
  6. cmd/test-utils_test.go

    		config.EnvRootPassword,
    	} {
    		os.Unsetenv(env)
    	}
    
    	// Set as non-distributed.
    	globalIsDistErasure = false
    
    	// Disable printing console messages during tests.
    	color.Output = io.Discard
    	// Disable Error logging in testing.
    	logger.DisableErrorLog = true
    
    	// Uncomment the following line to see trace logs during unit tests.
    	// logger.AddTarget(console.New())
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  7. internal/grid/connection.go

    				}
    				if hdr.OpCode.IsControl() {
    					if err := controlHandler(hdr, &wsReader); err != nil {
    						return nil, err
    					}
    					continue
    				}
    				if hdr.OpCode&want == 0 {
    					if err := wsReader.Discard(); err != nil {
    						return nil, err
    					}
    					continue
    				}
    				if int64(cap(dst)) < hdr.Length+1 {
    					dst = make([]byte, 0, hdr.Length+hdr.Length>>3)
    				}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  8. src/bytes/reader_test.go

    		n   int64
    		err error
    	}
    	type justReader struct {
    		io.Reader
    	}
    	type justWriter struct {
    		io.Writer
    	}
    	discard := justWriter{io.Discard} // hide ReadFrom
    
    	var with, withOut nErr
    	with.n, with.err = io.Copy(discard, NewReader(nil))
    	withOut.n, withOut.err = io.Copy(discard, justReader{NewReader(nil)})
    	if with != withOut {
    		t.Errorf("behavior differs: with = %#v; without: %#v", with, withOut)
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  9. logger/logger.go

    	Error(context.Context, string, ...interface{})
    	Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)
    }
    
    var (
    	// Discard logger will print any log to io.Discard
    	Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{})
    	// Default Default logger
    	Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
    		SlowThreshold:             200 * time.Millisecond,
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. cmd/storage-datatypes_test.go

    		MountPath: "/tmp/drive1",
    		ID:        "uuid",
    		Error:     "",
    	}
    
    	b.SetBytes(1)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		err := msgp.Encode(io.Discard, &v)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    func BenchmarkEncodeDiskInfoGOB(b *testing.B) {
    	v := DiskInfo{
    		Total:     1000,
    		Free:      1000,
    		Used:      1000,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 9.4K bytes
    - Viewed (0)
Back to top