Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 64 for ParseDuration (0.64 sec)

  1. tools/bug-report/pkg/config/config.go

    	if err := json.Unmarshal(b, &v); err != nil {
    		return err
    	}
    	switch value := v.(type) {
    	case float64:
    		*d = Duration(time.Duration(value))
    		return nil
    	case string:
    		tmp, err := time.ParseDuration(value)
    		if err != nil {
    			return err
    		}
    		*d = Duration(tmp)
    		return nil
    	default:
    		return errors.New("invalid duration")
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Nov 04 12:07:50 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  2. 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)
  3. pkg/test/echo/server/endpoint/http.go

    		echo.HostnameField.Write(body, hostname)
    	}
    }
    
    func delayResponse(request *http.Request) error {
    	d := request.FormValue("delay")
    	if len(d) == 0 {
    		return nil
    	}
    
    	t, err := time.ParseDuration(d)
    	if err != nil {
    		return err
    	}
    	time.Sleep(t)
    	return nil
    }
    
    func setHeaderResponseFromHeaders(request *http.Request, response http.ResponseWriter) error {
    	s := request.FormValue("headers")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  4. internal/config/identity/openid/openid.go

    // GetDefaultExpiration - returns the expiration seconds expected.
    func GetDefaultExpiration(dsecs string) (time.Duration, error) {
    	timeout := env.Get(config.EnvMinioStsDuration, "")
    	defaultExpiryDuration, err := time.ParseDuration(timeout)
    	if err != nil {
    		defaultExpiryDuration = time.Hour
    	}
    	if timeout == "" && dsecs != "" {
    		expirySecs, err := strconv.ParseInt(dsecs, 10, 64)
    		if err != nil {
    			return 0, auth.ErrInvalidDuration
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  5. internal/config/notify/parse.go

    		}
    		reconnectInterval, err := time.ParseDuration(env.Get(reconnectIntervalEnv,
    			kv.Get(target.MqttReconnectInterval)))
    		if err != nil {
    			return nil, err
    		}
    
    		keepAliveIntervalEnv := target.EnvMQTTKeepAliveInterval
    		if k != config.Default {
    			keepAliveIntervalEnv = keepAliveIntervalEnv + config.Default + k
    		}
    		keepAliveInterval, err := time.ParseDuration(env.Get(keepAliveIntervalEnv,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 46.4K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/apis/bootstraptoken/v1/utils_test.go

    					rt.data,
    					actual,
    				)
    			}
    		})
    	}
    }
    
    func mustParseDuration(durationStr string, t *testing.T) time.Duration {
    	d, err := time.ParseDuration(durationStr)
    	if err != nil {
    		t.Fatalf("couldn't parse duration %q: %v", durationStr, err)
    	}
    	return d
    }
    
    func TestBootstrapTokenFromSecret(t *testing.T) {
    	var tests = []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 26 15:51:39 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  7. cmd/admin-handlers-site-replication.go

    // [POST] /minio/admin/v3/site-replication/netperf
    func (a adminAPIHandlers) SiteReplicationNetPerf(w http.ResponseWriter, r *http.Request) {
    	durationStr := r.Form.Get(peerRESTDuration)
    	duration, _ := time.ParseDuration(durationStr)
    	if duration < globalNetPerfMinDuration {
    		duration = globalNetPerfMinDuration
    	}
    	result := siteNetperf(r.Context(), duration)
    	adminLogIf(r.Context(), gob.NewEncoder(w).Encode(result))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  8. cmd/bucket-replication-handlers.go

    	resetID := r.URL.Query().Get("reset-id")
    	if resetID == "" {
    		resetID = mustGetUUID()
    	}
    	var (
    		days time.Duration
    		err  error
    	)
    	if durationStr != "" {
    		days, err = time.ParseDuration(durationStr)
    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, InvalidArgument{
    				Bucket: bucket,
    				Err:    fmt.Errorf("invalid query parameter older-than %s for %s : %w", durationStr, bucket, err),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  9. operator/pkg/helmreconciler/reconciler.go

    		opts.ProgressLog = progress.NewLog()
    	}
    	if int64(opts.WaitTimeout) == 0 {
    		if waitForResourcesTimeoutStr, found := os.LookupEnv("WAIT_FOR_RESOURCES_TIMEOUT"); found {
    			if waitForResourcesTimeout, err := time.ParseDuration(waitForResourcesTimeoutStr); err == nil {
    				opts.WaitTimeout = waitForResourcesTimeout
    			} else {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 22 08:32:23 UTC 2024
    - 22K bytes
    - Viewed (0)
  10. cmd/peer-rest-server.go

    	if err != nil {
    		size = 64 * humanize.MiByte
    	}
    
    	concurrent, err := strconv.Atoi(concurrentStr)
    	if err != nil {
    		concurrent = 32
    	}
    
    	duration, err := time.ParseDuration(durationStr)
    	if err != nil {
    		duration = time.Second * 10
    	}
    
    	done := keepHTTPResponseAlive(w)
    
    	result, err := selfSpeedTest(r.Context(), speedTestOpts{
    		objectSize:      size,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 52.1K bytes
    - Viewed (0)
Back to top