Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 162 for newResource (0.24 sec)

  1. cmd/notification.go

    //
    // The first call to return a non-nil error will be
    // collected in errs slice and returned by Wait().
    func (g *NotificationGroup) Go(ctx context.Context, f func() error, index int, addr xnet.Host) {
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	g.workers.Take()
    
    	go func() {
    		defer g.workers.Give()
    
    		g.errs[index] = NotificationPeerErr{
    			Host: addr,
    		}
    
    		retryCount := g.retryCount
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 44.9K bytes
    - Viewed (0)
  2. src/runtime/mgcpacer_test.go

    			cycle++
    		}
    		return h
    	}
    }
    
    // random returns a stream that generates random numbers
    // between -amp and amp.
    func random(amp float64, seed int64) float64Stream {
    	r := rand.New(rand.NewSource(seed))
    	return func() float64 {
    		return ((r.Float64() - 0.5) * 2) * amp
    	}
    }
    
    // delay returns a new stream which is a buffered version
    // of f: it returns zero for cycles steps, followed by f.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 13:53:21 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  3. pkg/apis/certificates/validation/validation_test.go

    				t.Errorf("unexpected errors: %s", unexpected)
    			}
    		})
    	}
    }
    
    func mustMakeCertificate(t *testing.T, template *x509.Certificate) []byte {
    	gen := mathrand.New(mathrand.NewSource(12345))
    
    	pub, priv, err := ed25519.GenerateKey(gen)
    	if err != nil {
    		t.Fatalf("Error while generating key: %v", err)
    	}
    
    	cert, err := x509.CreateCertificate(gen, template, template, pub, priv)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:49 UTC 2023
    - 61K bytes
    - Viewed (0)
  4. cmd/erasure-sets.go

    // the set topology, this monitoring happens at a given monitoring interval.
    func (s *erasureSets) monitorAndConnectEndpoints(ctx context.Context, monitorInterval time.Duration) {
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	time.Sleep(time.Duration(r.Float64() * float64(time.Second)))
    
    	// Pre-emptively connect the disks if possible.
    	s.connectDisks()
    
    	monitor := time.NewTimer(monitorInterval)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testshared/shared_test.go

    	if len(info) != 2 {
    		t.Fatalf("go list failed to report Target and/or Shlib")
    	}
    	target := info[0]
    	shlib := info[1]
    
    	// If the source is newer than both the .a file and the .so, both are rebuilt.
    	t.Run("newsource", func(t *testing.T) {
    		resetFileStamps()
    		cleanup := touch(t, "./depBase/dep.go")
    		defer func() {
    			cleanup()
    			goCmd(t, "install", "-linkshared", "./exe")
    		}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 26 01:54:41 UTC 2023
    - 36.3K bytes
    - Viewed (0)
  6. src/encoding/gob/codec_test.go

    	testFuzz(t, 1330522872628565000, 100, new(int))
    }
    
    func testFuzz(t *testing.T, seed int64, n int, input ...any) {
    	for _, e := range input {
    		t.Logf("seed=%d n=%d e=%T", seed, n, e)
    		rng := rand.New(rand.NewSource(seed))
    		for i := 0; i < n; i++ {
    			encFuzzDec(rng, e)
    		}
    	}
    }
    
    // TestFuzzOneByte tries to decode corrupted input sequences
    // and checks that no panic occurs.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 19 23:03:14 UTC 2023
    - 36.9K bytes
    - Viewed (0)
  7. cmd/data-scanner.go

    )
    
    // initDataScanner will start the scanner in the background.
    func initDataScanner(ctx context.Context, objAPI ObjectLayer) {
    	go func() {
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		// Run the data scanner in a loop
    		for {
    			runDataScanner(ctx, objAPI)
    			duration := time.Duration(r.Float64() * float64(scannerCycle.Load()))
    			if duration < time.Second {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:43:17 UTC 2024
    - 47.6K bytes
    - Viewed (0)
  8. internal/grid/connection.go

    	if err != nil {
    		return err
    	}
    	return wsutil.WriteMessage(conn, c.side, ws.OpBinary, dst)
    }
    
    func (c *Connection) connect() {
    	c.updateState(StateConnecting)
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    	// Runs until the server is shut down.
    	for {
    		if c.State() == StateShutdown {
    			return
    		}
    		toDial := strings.Replace(c.Remote, "http://", "ws://", 1)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  9. src/bufio/bufio_test.go

    					t.Errorf("have=%q", written)
    				}
    			}
    		}
    	}
    }
    
    func TestWriterAppend(t *testing.T) {
    	got := new(bytes.Buffer)
    	var want []byte
    	rn := rand.New(rand.NewSource(0))
    	w := NewWriterSize(got, 64)
    	for i := 0; i < 100; i++ {
    		// Obtain a buffer to append to.
    		b := w.AvailableBuffer()
    		if w.Available() != cap(b) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:56:01 UTC 2023
    - 51.5K bytes
    - Viewed (0)
  10. cmd/test-utils_test.go

    		req.Header.Set(k, v)
    	}
    
    	err = signRequestV4(req, accessKey, secretKey)
    	if err != nil {
    		return nil, err
    	}
    
    	return req, nil
    }
    
    var src = rand.NewSource(time.Now().UnixNano())
    
    func randString(n int) string {
    	b := make([]byte, n)
    	// A src.Int63() generates 63 random bits, enough for letterIdxMax characters!
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
Back to top