Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FrequencyDur (0.25 sec)

  1. cmd/callhome.go

    				return
    			}
    
    			// callhome running on a different node.
    			// sleep for some time and try again.
    			duration := time.Duration(r.Float64() * float64(globalCallhomeConfig.FrequencyDur()))
    			if duration < time.Second {
    				// Make sure to sleep at least a second to avoid high CPU ticks.
    				duration = time.Second
    			}
    			time.Sleep(duration)
    		}
    	}()
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.1K bytes
    - Viewed (1)
  2. internal/config/callhome/callhome.go

    // Enabled - indicates if callhome is enabled or not
    func (c *Config) Enabled() bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable
    }
    
    // FrequencyDur - returns the currently configured callhome frequency
    func (c *Config) FrequencyDur() time.Duration {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	if c.Frequency == 0 {
    		return callhomeCycleDefault
    	}
    
    	return c.Frequency
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
Back to top