- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 40 for parseShort (0.15 sec)
-
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) -
cmd/kubeadm/app/util/endpoint.go
} // ParsePort parses a string representing a TCP port. // If the string is not a valid representation of a TCP port, ParsePort returns an error. func ParsePort(port string) (int, error) { portInt, err := netutils.ParsePort(port, true) if err == nil && (1 <= portInt && portInt <= 65535) { return portInt, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 11 15:08:59 UTC 2022 - 5.3K bytes - Viewed (0) -
guava/src/com/google/common/net/HostSpecifier.java
// Verify that no port was specified, and strip optional brackets from // IPv6 literals. HostAndPort parsedHost = HostAndPort.fromString(specifier); Preconditions.checkArgument(!parsedHost.hasPort()); String host = parsedHost.getHost(); // Try to interpret the specifier as an IP address. Note we build // the address rather than using the .is* methods because we want to
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 05 09:18:40 UTC 2023 - 6K bytes - Viewed (0) -
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) -
src/net/port_test.go
} func TestParsePort(t *testing.T) { // The following test cases are cribbed from the strconv for _, tt := range parsePortTests { if port, needsLookup := parsePort(tt.service); port != tt.port || needsLookup != tt.needsLookup { t.Errorf("parsePort(%q) = %d, %t; want %d, %t", tt.service, port, needsLookup, tt.port, tt.needsLookup) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 15 23:11:47 UTC 2016 - 1.3K bytes - Viewed (0) -
src/net/port.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net // parsePort parses service as a decimal integer and returns the // corresponding value as port. It is the caller's responsibility to // parse service as a non-decimal integer when needsLookup is true. // // Some system resolvers will return a valid port number when given a number
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 17:31:56 UTC 2017 - 1.5K bytes - Viewed (0) -
pkg/kube/inject/validate.go
return validatePortList("excludeOutboundPorts", ports) } // validateStatusPort validates the statusPort parameter func validateStatusPort(port string) error { if _, e := parsePort(port); e != nil { return fmt.Errorf("excludeInboundPorts invalid: %v", e) } return nil } // validateUInt32 validates that the given annotation value is a positive integer.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 20:06:41 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava/src/com/google/common/net/HostSpecifier.java
// Verify that no port was specified, and strip optional brackets from // IPv6 literals. HostAndPort parsedHost = HostAndPort.fromString(specifier); Preconditions.checkArgument(!parsedHost.hasPort()); String host = parsedHost.getHost(); // Try to interpret the specifier as an IP address. Note we build // the address rather than using the .is* methods because we want to
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 05 09:18:40 UTC 2023 - 6K bytes - Viewed (0) -
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) -
cmd/net.go
var localIP4 = mustGetLocalIP4() // mustSplitHostPort is a wrapper to net.SplitHostPort() where error is assumed to be a fatal. func mustSplitHostPort(hostPort string) (host, port string) { xh, err := xnet.ParseHost(hostPort) if err != nil { logger.FatalIf(err, "Unable to split host port %s", hostPort) } return xh.Name, xh.Port.String() } // mustGetLocalIPs returns IPs of local interface
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 9.3K bytes - Viewed (0)