Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for ParseDuration (0.32 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. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go

    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (d *Duration) UnmarshalJSON(b []byte) error {
    	var str string
    	err := json.Unmarshal(b, &str)
    	if err != nil {
    		return err
    	}
    
    	pd, err := time.ParseDuration(str)
    	if err != nil {
    		return err
    	}
    	d.Duration = pd
    	return nil
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (d Duration) MarshalJSON() ([]byte, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 08 00:11:06 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/formats.go

    	"password",     // any kind of string
    	"date",         // a date string like "2006-01-02" as defined by full-date in RFC3339
    	"duration",     // a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
    	"datetime",     // a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 09 09:26:38 UTC 2020
    - 3.3K bytes
    - Viewed (0)
Back to top