Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseMCPAddr (0.21 sec)

  1. 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 {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Jun 06 03:39:27 GMT 2022
    - 1.5K bytes
    - Viewed (1)
  2. 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
    			}
    		}
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
Back to top