- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ReturnLastGood (0.14 sec)
-
cmd/metrics-v3-cache.go
loadNodesUpDown := func(ctx context.Context) (v nodesOnline, err error) { v.Online, v.Offline = globalNotificationSys.GetPeerOnlineCount() return } return cachevalue.NewFromFunc(1*time.Minute, cachevalue.Opts{ReturnLastGood: true}, loadNodesUpDown) } type driveIOStatMetrics struct { readsPerSec float64 readsKBPerSec float64 readsAwait float64 writesPerSec float64 writesKBPerSec float64
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 8.1K bytes - Viewed (0) -
internal/cachevalue/cache.go
) // Opts contains options for the cache. type Opts struct { // When set to true, return the last cached value // even if updating the value errors out. // Returns the last good value AND the error. ReturnLastGood bool // If NoWait is set, Get() will return the last good value, // if TTL has expired but 2x TTL has not yet passed, // but will fetch a new value in the background. NoWait bool }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 12:50:46 UTC 2024 - 4.4K bytes - Viewed (0) -
cmd/data-usage.go
return map[string]uint64{}, nil } cache := dataUsageCache{} prefixUsageCache.InitOnce(30*time.Second, // No need to fail upon Update() error, fallback to old value. cachevalue.Opts{ReturnLastGood: true, NoWait: true}, func(ctx context.Context) (map[string]uint64, error) { m := make(map[string]uint64) for _, pool := range z.serverPools { for _, er := range pool.sets { // Load bucket usage prefixes
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 5.6K bytes - Viewed (0) -
cmd/bucket-quota.go
} var bucketStorageCache = cachevalue.New[DataUsageInfo]() // Init initialize bucket quota. func (sys *BucketQuotaSys) Init(objAPI ObjectLayer) { bucketStorageCache.InitOnce(10*time.Second, cachevalue.Opts{ReturnLastGood: true, NoWait: true}, func(ctx context.Context) (DataUsageInfo, error) { if objAPI == nil { return DataUsageInfo{}, errServerNotInitialized } ctx, done := context.WithTimeout(ctx, 2*time.Second)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 00:34:56 UTC 2024 - 4.4K bytes - Viewed (0)