- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for parseMCPAddr (0.1 sec)
-
istioctl/pkg/multixds/google.go
import ( "fmt" "net/url" "strings" ) func isMCPAddr(u *url.URL) bool { return strings.HasSuffix(u.Host, ".googleapis.com") || strings.HasSuffix(u.Host, ".googleapis.com:443") } func parseMCPAddr(u *url.URL) (*xdsAddr, error) { ret := &xdsAddr{host: u.Host} if !strings.HasSuffix(ret.host, ":443") { ret.host += ":443" } const projSeg = "/projects/" i := strings.Index(u.Path, projSeg) if i == -1 {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Jun 06 03:39:27 UTC 2022 - 1.5K bytes - Viewed (0) -
istioctl/pkg/multixds/gather.go
if wh.ClientConfig.URL != nil { u, err := url.Parse(*wh.ClientConfig.URL) if err != nil { return nil, fmt.Errorf("parsing webhook URL: %w", err) } if isMCPAddr(u) { return parseMCPAddr(u) } port := u.Port() if port == "" { port = "443" // default from Kubernetes } return &xdsAddr{host: net.JoinHostPort(u.Hostname(), port)}, nil } } }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 13.6K bytes - Viewed (0)