Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ParseDuration (0.38 sec)

  1. cmd/admin-handlers.go

    	ctx := r.Context()
    
    	objectAPI, _ := validateAdminReq(ctx, w, r, policy.ServerInfoAdminAction)
    	if objectAPI == nil {
    		return
    	}
    	const defaultMetricsInterval = time.Second
    
    	interval, err := time.ParseDuration(r.Form.Get("interval"))
    	if err != nil || interval < time.Second {
    		interval = defaultMetricsInterval
    	}
    
    	n, err := strconv.Atoi(r.Form.Get("n"))
    	if err != nil || n <= 0 {
    		n = math.MaxInt32
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  2. pkg/config/validation/validation_test.go

    	someNamespace = "bar"
    )
    
    func TestValidateMaxServerConnectionAge(t *testing.T) {
    	type durationCheck struct {
    		duration time.Duration
    		isValid  bool
    	}
    	durMin, _ := time.ParseDuration("-30m")
    	durHr, _ := time.ParseDuration("-1.5h")
    	checks := []durationCheck{
    		{
    			duration: 30 * time.Minute,
    			isValid:  true,
    		},
    		{
    			duration: durMin,
    			isValid:  false,
    		},
    		{
    			duration: durHr,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 03:11:45 UTC 2024
    - 196K bytes
    - Viewed (0)
  3. pkg/kubelet/eviction/helpers_test.go

    		if !ok {
    			t.Errorf("Didn't find reclaimable threshold, test: %v", testName)
    		}
    	}
    }
    
    func TestParseThresholdConfig(t *testing.T) {
    	gracePeriod, _ := time.ParseDuration("30s")
    	testCases := map[string]struct {
    		allocatableConfig       []string
    		evictionHard            map[string]string
    		evictionSoft            map[string]string
    		evictionSoftGracePeriod map[string]string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 106.7K bytes
    - Viewed (0)
  4. api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json

                "type": "string"
              },
              "id": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 04:18:56 UTC 2024
    - 178.6K bytes
    - Viewed (0)
Back to top