Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for ParseDuration (0.18 sec)

  1. internal/config/batch/batch.go

    	cfg.ExpirationWorkersWait = 0
    
    	rduration, err := time.ParseDuration(env.Get(EnvReplicationWorkersWait, kvs.GetWithDefault(ReplicationWorkersWait, DefaultKVS)))
    	if err != nil {
    		return cfg, err
    	}
    	if rduration < 0 {
    		return cfg, config.ErrInvalidBatchReplicationWorkersWait(nil)
    	}
    
    	kduration, err := time.ParseDuration(env.Get(EnvKeyRotationWorkersWait, kvs.GetWithDefault(KeyRotationWorkersWait, DefaultKVS)))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. internal/config/drive/drive.go

    	d := env.Get(EnvMaxDriveTimeout, env.Get(EnvMaxDriveTimeoutLegacy, env.Get(EnvMaxDiskTimeoutLegacy, kvs.GetWithDefault(MaxTimeout, DefaultKVS))))
    	if d == "" {
    		cfg.MaxTimeout = 30 * time.Second
    	} else {
    		dur, _ := time.ParseDuration(d)
    		if dur < time.Second {
    			cfg.MaxTimeout = 30 * time.Second
    		} else {
    			cfg.MaxTimeout = getMaxTimeout(dur)
    		}
    	}
    	return cfg, err
    }
    
    func getMaxTimeout(t time.Duration) time.Duration {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. security/pkg/pki/ca/fuzz_test.go

    		if err != nil {
    			return
    		}
    
    		// create cert options
    		certOpts := CertOpts{}
    		err = ff.GenerateStruct(&certOpts)
    		if err != nil {
    			return
    		}
    		TTL, err := time.ParseDuration("800ms")
    		if err != nil {
    			return
    		}
    		certOpts.TTL = TTL
    
    		// call target
    		ca.Sign(csrPEM, certOpts)
    	})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 12 14:51:41 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  4. internal/config/scanner/scanner.go

    		maxWait = env.Get(EnvMaxWait, kvs.GetWithDefault(MaxWait, DefaultKVS))
    	}
    	cfg.MaxWait, err = time.ParseDuration(maxWait)
    	if err != nil {
    		return err
    	}
    	cycle := env.Get(EnvCycle, kvs.GetWithDefault(Cycle, DefaultKVS))
    	if cycle == "" {
    		cycle = "1m"
    	}
    	cfg.Cycle, err = time.ParseDuration(cycle)
    	if err != nil {
    		return err
    	}
    	return nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  5. src/flag/example_test.go

    	//	-deltaT 10s -deltaT 15s
    	// and other combinations.
    	if len(*i) > 0 {
    		return errors.New("interval flag already set")
    	}
    	for _, dt := range strings.Split(value, ",") {
    		duration, err := time.ParseDuration(dt)
    		if err != nil {
    			return err
    		}
    		*i = append(*i, duration)
    	}
    	return nil
    }
    
    // Define a flag to accumulate durations. Because it has a special type,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 18:59:00 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  6. internal/config/callhome/callhome.go

    		return cfg, err
    	}
    
    	cfg.Enable = env.Get(config.EnvMinIOCallhomeEnable,
    		kvs.GetWithDefault(Enable, DefaultKVS)) == config.EnableOn
    	cfg.Frequency, err = time.ParseDuration(env.Get(config.EnvMinIOCallhomeFrequency,
    		kvs.GetWithDefault(Frequency, DefaultKVS)))
    	return cfg, err
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. samples/jwt-server/src/main.go

    	// Add artificious delay based on delay query
    	delayParam := request.URL.Query().Get("delay")
    	if delayParam != "" {
    		delayDuration, err := time.ParseDuration(delayParam)
    		if err != nil {
    			// Handle invalid delay parameter
    			response.WriteHeader(http.StatusBadRequest)
    			response.Write([]byte("Invalid delay parameter"))
    			return
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 16 23:56:50 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. pkg/util/coverage/coverage.go

    	fmt.Println("Dumping coverage information to " + coverageFile)
    
    	flushInterval := 5 * time.Second
    	requestedInterval := os.Getenv("KUBE_COVERAGE_FLUSH_INTERVAL")
    	if requestedInterval != "" {
    		if duration, err := time.ParseDuration(requestedInterval); err == nil {
    			flushInterval = duration
    		} else {
    			panic("Invalid KUBE_COVERAGE_FLUSH_INTERVAL value; try something like '30s'.")
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 21:00:21 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  9. pkg/test/csrctrl/controllers/csr_controller.go

    			return nil
    		}
    
    		requestedLifeTime := signer.CertTTL
    		requestedDuration, ok := csr.Annotations[RequestLifeTimeAnnotationForCertManager]
    		if ok {
    			duration, err := time.ParseDuration(requestedDuration)
    			if err == nil {
    				requestedLifeTime = duration
    			}
    		}
    		cert, err := signer.Sign(x509cr, csr.Spec.Usages, requestedLifeTime, false)
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 17:36:41 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. internal/config/heal/heal.go

    	if _, err = parseBitrotConfig(bitrot); err != nil {
    		return cfg, fmt.Errorf("'heal:bitrotscan' value invalid: %w", err)
    	}
    
    	cfg.Bitrot = bitrot
    
    	cfg.Sleep, err = time.ParseDuration(env.Get(EnvSleep, kvs.GetWithDefault(Sleep, DefaultKVS)))
    	if err != nil {
    		return cfg, fmt.Errorf("'heal:max_sleep' value invalid: %w", err)
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top