- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for NewTimer (7.19 sec)
-
internal/http/server.go
} return interval } // Wait for opened connection to be closed up to Shutdown timeout. shutdownTimeout := srv.ShutdownTimeout shutdownTimer := time.NewTimer(shutdownTimeout) defer shutdownTimer.Stop() timer := time.NewTimer(nextPollInterval()) defer timer.Stop() for { select { case <-shutdownTimer.C: if atomic.LoadInt32(&srv.requestCount) <= 0 { return nil }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 09 21:25:16 GMT 2024 - 7.7K bytes - Viewed (0) -
cmd/license-update.go
} time.Sleep(duration) } }() } func licenceUpdaterLoop(ctx context.Context, objAPI ObjectLayer) { ctx, cancel := globalLeaderLock.GetLock(ctx) defer cancel() licenseUpdateTimer := time.NewTimer(licUpdateCycle) defer licenseUpdateTimer.Stop() for { select { case <-ctx.Done(): return case <-licenseUpdateTimer.C: if globalSubnetConfig.Registered() {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 3.3K bytes - Viewed (0) -
cmd/bucket-targets.go
} clnt.SetCustomTransport(globalRemoteTargetTransport) return clnt } // heartBeat performs liveness check on remote endpoints. func (sys *BucketTargetSys) heartBeat(ctx context.Context) { hcTimer := time.NewTimer(defaultHealthCheckDuration) defer hcTimer.Stop() for { select { case <-hcTimer.C: sys.hMutex.RLock() eps := make([]madmin.ServerProperties, 0, len(sys.hc)) for _, ep := range sys.hc {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed May 01 01:09:56 GMT 2024 - 20.9K bytes - Viewed (0) -
internal/dsync/dsync_test.go
if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) { t.Fatal("GetLock() should be successful") } // Make it run twice. timer := time.NewTimer(testDrwMutexRefreshInterval * 2) select { case <-ctx.Done(): t.Fatal("Lock context canceled which is not expected") case <-timer.C: } // Should be safe operation in all cases
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
cmd/tier.go
randInterval := func() time.Duration { return time.Duration(r.Float64() * 5 * float64(time.Second)) } // To avoid all MinIO nodes reading the tier config object at the same // time. t := time.NewTimer(tierCfgRefresh + randInterval()) defer t.Stop() for { select { case <-ctx.Done(): return case <-t.C: err := config.Reload(ctx, objAPI) if err != nil { tierLogIf(ctx, err)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Apr 17 05:09:58 GMT 2024 - 15.5K bytes - Viewed (0) -
cmd/admin-heal-ops.go
} func (ahs *allHealState) periodicHealSeqsClean(ctx context.Context) { // Launch clean-up routine to remove this heal sequence (after // it ends) from the global state after timeout has elapsed. periodicTimer := time.NewTimer(time.Minute * 5) defer periodicTimer.Stop() for { select { case <-periodicTimer.C: now := UTCNow() ahs.Lock() for path, h := range ahs.healSeqMap {
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) -
cmd/erasure-server-pool-rebalance.go
// time. r := rand.New(rand.NewSource(time.Now().UnixNano())) randSleepFor := func() time.Duration { return 5*time.Second + time.Duration(float64(5*time.Second)*r.Float64()) } timer := time.NewTimer(randSleepFor()) defer timer.Stop() var ( quit bool traceMsg string ) for { select { case rebalErr := <-doneCh: quit = true now := time.Now()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Apr 26 19:29:28 GMT 2024 - 27.2K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
} } // Offset checks a bit. time.Sleep(time.Duration(rng.Int63n(int64(1 * time.Second)))) dctx, dcancel := context.WithCancel(ctx) started := time.Now() go func() { timeout := time.NewTimer(globalDriveConfig.GetMaxTimeout()) select { case <-dctx.Done(): if !timeout.Stop() { <-timeout.C } case <-timeout.C: spent := time.Since(started)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 33K bytes - Viewed (0) -
cmd/metrics-resource.go
func startResourceMetricsCollection() { initLatestValues() resourceMetricsMapMu.Lock() resourceMetricsMap = map[MetricSubsystem]ResourceMetrics{} resourceMetricsMapMu.Unlock() metricsTimer := time.NewTimer(resourceMetricsCollectionInterval) defer metricsTimer.Stop() collectLocalResourceMetrics() for { select { case <-GlobalContext.Done(): return case <-metricsTimer.C:
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 17.4K bytes - Viewed (0) -
cmd/iam.go
randAmt := time.Duration(r.Float64() * float64(baseInterval)) return baseInterval/2 + randAmt } var maxDurationSecondsForLog float64 = 5 timer := time.NewTimer(waitInterval()) defer timer.Stop() for { select { case <-timer.C: // Load all IAM items (except STS creds) periodically. refreshStart := time.Now()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 25 21:28:16 GMT 2024 - 71.1K bytes - Viewed (1)