- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for NewTicker (0.2 sec)
-
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) -
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) -
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) -
cmd/metrics-v2_test.go
label: labels[1], }, { val: 0.31, label: labels[1], }, { val: 0.61, label: labels[3], }, { val: 0.79, label: labels[2], }, } ticker := time.NewTicker(1 * time.Millisecond) defer ticker.Stop() for _, obs := range observations { // Send observations once every 1ms, to simulate delay between // observations. This is to test the channel based
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Mar 04 18:05:56 UTC 2024 - 2.3K bytes - Viewed (0) -
internal/bucket/bandwidth/monitor.go
m := &Monitor{ bucketsMeasurement: make(map[BucketOptions]*bucketMeasurement), bucketsThrottle: make(map[BucketOptions]*bucketThrottle), bucketMovingAvgTicker: time.NewTicker(2 * time.Second), ctx: ctx, NodeCount: numNodes, } go m.trackEWMA() return m } func (m *Monitor) updateMeasurement(opts BucketOptions, bytes uint64) { m.mlock.Lock()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 6K bytes - Viewed (0) -
cmd/metacache-manager.go
// Start saver when object layer is ready. go func() { objAPI := newObjectLayerFn() for objAPI == nil { time.Sleep(time.Second) objAPI = newObjectLayerFn() } t := time.NewTicker(time.Minute) defer t.Stop() var exit bool for !exit { select { case <-t.C: case <-GlobalContext.Done(): exit = true } m.mu.RLock() for _, v := range m.buckets {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 25 00:44:15 UTC 2022 - 5.2K bytes - Viewed (0) -
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) -
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) -
cmd/site-replication-metrics.go
} else { srs.XferRateSml.addSize(sz, duration) } } func newSRStats() *SRStats { s := SRStats{ M: make(map[string]*SRStatus), movingAvgTicker: time.NewTicker(time.Second * 2), } go s.trackEWMA() return &s } func (sr *SRStats) trackEWMA() { for { select { case <-sr.movingAvgTicker.C: sr.updateMovingAvg() case <-GlobalContext.Done():
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 06:00:45 UTC 2024 - 8.2K bytes - Viewed (0)