Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewFromFunc (0.45 sec)

  1. cmd/metrics-v3-cache.go

    }
    
    func newNodesUpDownCache() *cachevalue.Cache[nodesOnline] {
    	loadNodesUpDown := func() (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
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  2. cmd/metrics-v2.go

    // RegisterRead register the metrics populator function to be used
    // to populate new values upon cache invalidation.
    func (g *MetricsGroupV2) RegisterRead(read func(context.Context) []MetricV2) {
    	g.metricsCache = cachevalue.NewFromFunc(g.cacheInterval,
    		cachevalue.Opts{ReturnLastGood: true},
    		func() ([]MetricV2, error) {
    			if g.metricsGroupOpts.dependGlobalObjectAPI {
    				objLayer := newObjectLayerFn()
    				// Service not initialized yet
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
Back to top