Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for ParseDuration (0.27 sec)

  1. internal/config/api/api.go

    		return cfg, errors.New("invalid API max requests value")
    	}
    
    	requestsDeadline, err := time.ParseDuration(env.Get(EnvAPIRequestsDeadline, kvs.GetWithDefault(apiRequestsDeadline, DefaultKVS)))
    	if err != nil {
    		return cfg, err
    	}
    	cfg.RequestsDeadline = requestsDeadline
    
    	clusterDeadline, err := time.ParseDuration(env.Get(EnvAPIClusterDeadline, kvs.GetWithDefault(apiClusterDeadline, DefaultKVS)))
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/time/example_test.go

    	// d.Truncate( 10m0s) = 1h10m0s
    	// d.Truncate(1h0m0s) = 1h0m0s
    }
    
    func ExampleParseDuration() {
    	hours, _ := time.ParseDuration("10h")
    	complex, _ := time.ParseDuration("1h10m10s")
    	micro, _ := time.ParseDuration("1µs")
    	// The package also accepts the incorrect but common prefix u for micro.
    	micro2, _ := time.ParseDuration("1us")
    
    	fmt.Println(hours)
    	fmt.Println(complex)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  3. pilot/pkg/networking/core/listener_builder.go

    		ConfigType: &listener.Filter_TypedConfig{TypedConfig: protoconv.MessageToAny(tcpProxy)},
    	})
    
    	return filterStack
    }
    
    func parseDuration(s string) *durationpb.Duration {
    	if s == "" {
    		return nil
    	}
    	t, err := time.ParseDuration(s)
    	if err != nil {
    		return nil
    	}
    	return durationpb.New(t)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 06 04:44:06 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  4. src/cmd/trace/tasks.go

    			return !task.Complete()
    		})
    	}
    	if lat, err := time.ParseDuration(r.FormValue("latmin")); err == nil {
    		name = append(name, fmt.Sprintf("latency >= %s", lat))
    		conditions = append(conditions, func(t *parsedTrace, task *trace.UserTaskSummary) bool {
    			return task.Complete() && taskInterval(t, task).duration() >= lat
    		})
    	}
    	if lat, err := time.ParseDuration(r.FormValue("latmax")); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/networkfilter.go

    	includeMx bool,
    ) []*listener.Filter {
    	idleTimeout := destinationRule.GetTrafficPolicy().GetConnectionPool().GetTcp().GetIdleTimeout()
    	if idleTimeout == nil {
    		idleTimeout = parseDuration(lb.node.Metadata.IdleTimeout)
    	}
    	tcpProxy := &tcp.TcpProxy{
    		StatPrefix:                      statPrefix,
    		ClusterSpecifier:                &tcp.TcpProxy_Cluster{Cluster: clusterName},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  6. src/flag/flag.go

    Integer flags accept 1234, 0664, 0x1234 and may be negative.
    Boolean flags may be:
    
    	1, 0, t, f, T, F, true, false, TRUE, FALSE, True, False
    
    Duration flags accept any input valid for time.ParseDuration.
    
    The default set of command-line flags is controlled by
    top-level functions.  The [FlagSet] type allows one to define
    independent sets of flags, such as to implement subcommands
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:38:24 UTC 2024
    - 39.7K bytes
    - Viewed (0)
  7. src/cmd/trace/regions.go

    	}
    
    	if lat, err := time.ParseDuration(r.FormValue("latmin")); err == nil {
    		name = append(name, fmt.Sprintf("(latency >= %s)", lat))
    		conditions = append(conditions, func(t *parsedTrace, r *trace.UserRegionSummary) bool {
    			return regionInterval(t, r).duration() >= lat
    		})
    		filterParams.Add("latmin", lat.String())
    	}
    	if lat, err := time.ParseDuration(r.FormValue("latmax")); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top