Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for NewSource (0.31 sec)

  1. 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)
    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)
  2. 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)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 37.7K bytes
    - Viewed (5)
  3. cmd/metacache-entries_test.go

    			wantSelected: &inputSerialized[9],
    			wantOk:       true,
    		},
    	}
    
    	for testID, tt := range tests {
    		rng := rand.New(rand.NewSource(0))
    		// Run for a number of times, shuffling the input to ensure that output is consistent.
    		for i := 0; i < 10; i++ {
    			t.Run(fmt.Sprintf("test-%d-%s-run-%d", testID, tt.name, i), func(t *testing.T) {
    				if i > 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 31.6K bytes
    - Viewed (0)
  4. 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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 47.6K bytes
    - Viewed (0)
  5. 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!
    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)
  6. cmd/erasure-server-pool.go

    	})
    
    	bootstrapTrace("initHealMRF", func() {
    		go globalMRFState.healRoutine(z)
    	})
    
    	// initialize the object layer.
    	defer setObjectLayer(z)
    
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	attempt := 1
    	for {
    		var err error
    		bootstrapTrace(fmt.Sprintf("poolMeta.Init: loading pool metadata, attempt: %d", attempt), func() {
    			err = z.Init(ctx) // Initializes all pools.
    		})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  7. 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) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  8. cmd/bucket-replication.go

    	go p.startResyncRoutine(ctx, buckets, objAPI)
    	return nil
    }
    
    func (p *ReplicationPool) startResyncRoutine(ctx context.Context, buckets []BucketInfo, objAPI ObjectLayer) {
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	// Run the replication resync in a loop
    	for {
    		if err := p.loadResync(ctx, buckets, objAPI); err == nil {
    			<-ctx.Done()
    			return
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  9. cmd/site-replication.go

    }
    
    // Init - initialize the site replication manager.
    func (c *SiteReplicationSys) Init(ctx context.Context, objAPI ObjectLayer) error {
    	go c.startHealRoutine(ctx, objAPI)
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for {
    		err := c.loadFromDisk(ctx, objAPI)
    		if err == errConfigNotFound {
    			return nil
    		}
    		if err == nil {
    			break
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  10. api/go1.txt

    pkg math/rand, func Int31n(int32) int32
    pkg math/rand, func Int63() int64
    pkg math/rand, func Int63n(int64) int64
    pkg math/rand, func Intn(int) int
    pkg math/rand, func New(Source) *Rand
    pkg math/rand, func NewSource(int64) Source
    pkg math/rand, func NewZipf(*Rand, float64, float64, uint64) *Zipf
    pkg math/rand, func NormFloat64() float64
    pkg math/rand, func Perm(int) []int
    pkg math/rand, func Seed(int64)
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top