Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ApplyFunc (0.15 sec)

  1. cmd/net.go

    	hostIPs, err := getHostIP(host)
    	if err != nil {
    		return false, err
    	}
    
    	nonInterIPV4s := mustGetLocalIP4().Intersection(hostIPs)
    	if nonInterIPV4s.IsEmpty() {
    		hostIPs = hostIPs.ApplyFunc(func(ip string) string {
    			if net.ParseIP(ip).IsLoopback() {
    				// Any loopback IP which is not 127.0.0.1
    				// convert it to check for intersections.
    				return "127.0.0.1"
    			}
    			return ip
    		})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. internal/config/dns/etcd_dns.go

    		setter(args)
    	}
    
    	if len(args.domainNames) == 0 || args.domainIPs.IsEmpty() {
    		return nil, errors.New("invalid argument")
    	}
    
    	// strip ports off of domainIPs
    	domainIPsWithoutPorts := args.domainIPs.ApplyFunc(func(ip string) string {
    		host, _, err := net.SplitHostPort(ip)
    		if err != nil {
    			if strings.Contains(err.Error(), "missing port in address") {
    				host = ip
    			}
    		}
    		return host
    	})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  3. cmd/endpoint.go

    			} else {
    				continue
    			}
    		}
    
    		if net.ParseIP(host) == nil {
    			IPs, err := getHostIP(host)
    			if err != nil {
    				continue
    			}
    
    			IPsWithPort := IPs.ApplyFunc(func(ip string) string {
    				return net.JoinHostPort(ip, port)
    			})
    
    			ipList = ipList.Union(IPsWithPort)
    		}
    
    		ipList.Add(net.JoinHostPort(host, port))
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 34.1K bytes
    - Viewed (0)
Back to top