Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for parseShort (0.16 sec)

  1. android/guava/src/com/google/common/net/HostAndPort.java

      public static HostAndPort fromParts(String host, int port) {
        checkArgument(isValidPort(port), "Port out of range: %s", port);
        HostAndPort parsedHost = fromString(host);
        checkArgument(!parsedHost.hasPort(), "Host has a port: %s", host);
        return new HostAndPort(parsedHost.host, port, parsedHost.hasBracketlessColons);
      }
    
      /**
       * Build a HostAndPort instance from a host only.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Aug 22 20:55:57 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  2. pilot/pkg/model/context_test.go

    		t.Errorf("ParsePort(127.0.0.1) => Got %d, want 0", port)
    	}
    	if port := model.ParsePort("[::1]:3000"); port != 3000 {
    		t.Errorf("ParsePort([::1]:3000) => Got %d, want 3000", port)
    	}
    	if port := model.ParsePort("::1"); port != 0 {
    		t.Errorf("ParsePort(::1) => Got %d, want 0", port)
    	}
    	if port := model.ParsePort("[2001:4860:0:2001::68]:3000"); port != 3000 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 05 23:51:52 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/net/HostAndPort.java

      public static HostAndPort fromParts(String host, int port) {
        checkArgument(isValidPort(port), "Port out of range: %s", port);
        HostAndPort parsedHost = fromString(host);
        checkArgument(!parsedHost.hasPort(), "Host has a port: %s", host);
        return new HostAndPort(parsedHost.host, port, parsedHost.hasBracketlessColons);
      }
    
      /**
       * Build a HostAndPort instance from a host only.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Aug 22 20:55:57 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  4. pilot/pkg/security/authz/builder/extauthz.go

    }
    
    func buildExtAuthzHTTP(push *model.PushContext,
    	config *meshconfig.MeshConfig_ExtensionProvider_EnvoyExternalAuthorizationHttpProvider,
    ) (*builtExtAuthz, error) {
    	var errs error
    	port, err := parsePort(config.Port)
    	if err != nil {
    		errs = multierror.Append(errs, err)
    	}
    	hostname, cluster, err := model.LookupCluster(push, config.Service, port)
    	if err != nil {
    		model.IncLookupClusterFailures("authz")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. cni/pkg/plugin/sidecar_redirect.go

    	dedup := make(map[string]bool)
    	keys := []string{}
    
    	for _, port := range ports {
    		if !dedup[port] {
    			dedup[port] = true
    			keys = append(keys, port)
    		}
    	}
    	return keys
    }
    
    func parsePort(portStr string) (uint16, error) {
    	port, err := strconv.ParseUint(strings.TrimSpace(portStr), 10, 16)
    	if err != nil {
    		return 0, fmt.Errorf("failed parsing port %q: %v", portStr, err)
    	}
    	return uint16(port), nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  6. cmd/generic-handlers.go

    	_, redirect := redirectPrefixes[path.Clean(bucket)]
    	if redirect || resource == slashSeparator {
    		if globalBrowserRedirectURL != nil {
    			return globalBrowserRedirectURL
    		}
    		xhost, err := xnet.ParseHost(r.Host)
    		if err != nil {
    			return nil
    		}
    		return &xnet.URL{
    			Host: net.JoinHostPort(xhost.Name, globalMinioConsolePort),
    			Scheme: func() string {
    				scheme := "http"
    				if r.TLS != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 06 01:01:15 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/endpoint_test.go

    			name:          "invalid port (>65535)",
    			port:          "66535",
    			expectedError: true,
    		},
    	}
    
    	for _, rt := range tests {
    		t.Run(rt.name, func(t *testing.T) {
    			actualPort, actualError := ParsePort(rt.port)
    
    			if (actualError != nil) && !rt.expectedError {
    				t.Errorf("%s unexpected failure: %v", rt.name, actualError)
    				return
    			} else if (actualError == nil) && rt.expectedError {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 23 03:19:26 UTC 2019
    - 10K bytes
    - Viewed (0)
  8. internal/config/notify/parse.go

    		if len(kafkaBrokers) == 0 {
    			return nil, config.Errorf("kafka 'brokers' cannot be empty")
    		}
    		for _, s := range strings.Split(kafkaBrokers, config.ValueSeparator) {
    			var host *xnet.Host
    			host, err = xnet.ParseHost(s)
    			if err != nil {
    				break
    			}
    			brokers = append(brokers, *host)
    		}
    		if err != nil {
    			return nil, err
    		}
    
    		queueLimitEnv := target.EnvKafkaQueueLimit
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 46.4K bytes
    - Viewed (0)
  9. src/net/url/url.go

    	}
    	return url, nil
    }
    
    func parseAuthority(authority string) (user *Userinfo, host string, err error) {
    	i := strings.LastIndex(authority, "@")
    	if i < 0 {
    		host, err = parseHost(authority)
    	} else {
    		host, err = parseHost(authority[i+1:])
    	}
    	if err != nil {
    		return nil, "", err
    	}
    	if i < 0 {
    		return nil, host, nil
    	}
    	userinfo := authority[:i]
    	if !validUserinfo(userinfo) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 36.1K bytes
    - Viewed (0)
  10. internal/logger/target/kafka/kafka.go

    }
    
    func (h *Target) validate() error {
    	if len(h.kconfig.Brokers) == 0 {
    		return errors.New("no broker address found")
    	}
    	for _, b := range h.kconfig.Brokers {
    		if _, err := xnet.ParseHost(b.String()); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    // Name returns the name of the target
    func (h *Target) Name() string {
    	return "minio-kafka-audit"
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jun 02 03:03:39 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top