- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for convertToPort (0.16 sec)
-
pilot/pkg/security/authz/model/util.go
matcherpb "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" "istio.io/istio/pilot/pkg/security/authz/matcher" "istio.io/istio/pilot/pkg/xds/filters" ) // convertToPort converts a port string to a uint32. func convertToPort(v string) (uint32, error) { p, err := strconv.ParseUint(v, 10, 32) if err != nil || p > 65535 { return 0, fmt.Errorf("invalid port %s: %v", v, err) } return uint32(p), nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 25 10:39:25 UTC 2024 - 3.4K bytes - Viewed (0) -
pilot/pkg/security/authz/model/util_test.go
V: "91234", Err: "invalid port 91234:", }, { Name: "valid port", V: "443", Expect: 443, }, } for _, tc := range testCases { actual, err := convertToPort(tc.V) if tc.Err != "" { if err == nil { t.Errorf("%s: expecting error %s but found no error", tc.Name, tc.Err) } else if !strings.HasPrefix(err.Error(), tc.Err) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Oct 30 00:00:33 UTC 2020 - 2.8K bytes - Viewed (0)