Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for NewTicker (0.56 sec)

  1. internal/store/store.go

    func replayItems[I any](store Store[I], doneCh <-chan struct{}, log logger, id string) <-chan Key {
    	keyCh := make(chan Key)
    
    	go func() {
    		defer xioutil.SafeClose(keyCh)
    
    		retryTicker := time.NewTicker(retryInterval)
    		defer retryTicker.Stop()
    
    		for {
    			for _, key := range store.List() {
    				select {
    				case keyCh <- key:
    				// Get next key.
    				case <-doneCh:
    					return
    				}
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. cmd/listen-notification-handlers.go

    		}
    		if pingInterval < 1 {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidQueryParams), r.URL)
    			return
    		}
    		t := time.NewTicker(time.Duration(pingInterval) * time.Second)
    		defer t.Stop()
    		emptyEventTicker = t.C
    	} else {
    		// Deprecated Apr 2023
    		t := time.NewTicker(500 * time.Millisecond)
    		defer t.Stop()
    		keepAliveTicker = t.C
    	}
    
    	enc := json.NewEncoder(w)
    	for {
    		select {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. internal/store/batch.go

    	batch := &Batch[I]{
    		items:  make([]I, 0, config.Limit),
    		limit:  config.Limit,
    		store:  config.Store,
    		quitCh: quitCh,
    	}
    	if batch.store != nil {
    		go func() {
    			commitTicker := time.NewTicker(config.CommitTimeout)
    			defer commitTicker.Stop()
    			for {
    				select {
    				case <-commitTicker.C:
    				case <-batch.quitCh:
    					return
    				}
    				batch.Lock()
    				err := batch.commit()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. cmd/bucket-replication-stats.go

    		qCache:          newQueueCache(r),
    		pCache:          newProxyStatsCache(),
    		srStats:         newSRStats(),
    		movingAvgTicker: time.NewTicker(2 * time.Second),
    		wTimer:          time.NewTicker(2 * time.Second),
    		qTimer:          time.NewTicker(2 * time.Second),
    
    		workers:  newActiveWorkerStat(r),
    		registry: r,
    	}
    	go rs.collectWorkerMetrics(ctx)
    	go rs.collectQueueMetrics(ctx)
    	return &rs
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  5. internal/grid/muxclient.go

    		if m.respErr.Load() == nil {
    			xioutil.SafeClose(respHandler)
    		}
    	}()
    	var pingTimer <-chan time.Time
    	if m.deadline == 0 || m.deadline > m.clientPingInterval {
    		ticker := time.NewTicker(m.clientPingInterval)
    		defer ticker.Stop()
    		pingTimer = ticker.C
    		atomic.StoreInt64(&m.LastPong, time.Now().UnixNano())
    	}
    	defer m.parent.deleteMux(false, m.MuxID)
    	for {
    		select {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  6. cmd/admin-handlers.go

    		for _, k := range hosts {
    			if k != "" {
    				hostMap[k] = struct{}{}
    			}
    		}
    	}
    	dID := r.Form.Get("by-depID")
    	done := ctx.Done()
    	ticker := time.NewTicker(interval)
    	defer ticker.Stop()
    	w.Header().Set(xhttp.ContentType, string(mimeJSON))
    
    	enc := json.NewEncoder(w)
    	for n > 0 {
    		var m madmin.RealtimeMetrics
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
  7. cmd/metacache.go

    func (m metacache) keepAlive(ctx context.Context, rpc *peerRESTClient) {
    	// we intentionally operate on a copy of m, so we can update without locks.
    	t := time.NewTicker(metacacheMaxClientWait / 10)
    	defer t.Stop()
    	for {
    		select {
    		case <-ctx.Done():
    			// Request is done, stop updating.
    			return
    		case <-t.C:
    			m.lastHandout = time.Now()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 16:23:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. internal/grid/muxserver.go

    	handlerErr = handler.Handle(ctx, msg.Payload, handlerIn, send)
    	return handlerErr
    }
    
    // checkRemoteAlive will check if the remote is alive.
    func (m *muxServer) checkRemoteAlive() {
    	t := time.NewTicker(m.clientPingInterval)
    	defer t.Stop()
    	for {
    		select {
    		case <-m.ctx.Done():
    			return
    		case <-t.C:
    			last := time.Since(time.Unix(atomic.LoadInt64(&m.LastPing), 0))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  9. cmd/prepare-storage.go

    	if err == nil {
    		return storageDisks, format, nil
    	}
    
    	tries++ // tried already once
    
    	// Wait on each try for an update.
    	ticker := time.NewTicker(1 * time.Second)
    	defer ticker.Stop()
    
    	for {
    		// Only log once every 10 iterations, then reset the tries count.
    		verbose = tries >= 10
    		if verbose {
    			tries = 1
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 11.1K bytes
    - Viewed (1)
  10. istioctl/pkg/waypoint/waypoint.go

    					return fmt.Errorf("missing Kubernetes Gateway CRDs need to be installed before applying a waypoint: %s", err)
    				}
    				return err
    			}
    
    			if waitReady {
    				startTime := time.Now()
    				ticker := time.NewTicker(1 * time.Second)
    				defer ticker.Stop()
    				for range ticker.C {
    					programmed := false
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 09 16:05:45 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top