Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for Addr (0.13 sec)

  1. internal/http/listener.go

    		listener.listeners[i].Close()
    	}
    
    	return nil
    }
    
    // Addr - net.Listener interface compatible method returns net.Addr.  In case of multiple TCP listeners, it returns '0.0.0.0' as IP address.
    func (listener *httpListener) Addr() (addr net.Addr) {
    	addr = listener.listeners[0].Addr()
    	if len(listener.listeners) == 1 {
    		return addr
    	}
    
    	tcpAddr := addr.(*net.TCPAddr)
    	if ip := net.ParseIP("0.0.0.0"); ip != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/cni-watcher_test.go

    	assert.Error(t, err)
    }
    
    func TestCNIPluginServer(t *testing.T) {
    	fakePodIP := "11.1.1.12"
    	_, addr, _ := net.ParseCIDR(fakePodIP + "/32")
    	valid := CNIPluginAddEvent{
    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    		PodNamespace: "funkyns",
    		IPs: []IPConfig{{
    			Address: *addr,
    		}},
    	}
    
    	setupLogging()
    	NodeName = "testnode"
    	ctx, cancel := context.WithCancel(context.Background())
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/envoy/configdump/endpoint.go

    }
    
    func retrieveEndpointAddress(ep *endpoint.LbEndpoint) string {
    	addr := ep.GetEndpoint().GetAddress()
    	if addr := addr.GetSocketAddress(); addr != nil {
    		return addr.Address + ":" + strconv.Itoa(int(addr.GetPortValue()))
    	}
    	if addr := addr.GetPipe(); addr != nil {
    		return addr.GetPath()
    	}
    	if internal := addr.GetEnvoyInternalAddress(); internal != nil {
    		switch an := internal.GetAddressNameSpecifier().(type) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. cni/pkg/ipset/nldeps_unspecified.go

    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) listEntriesByIP(name string) ([]netip.Addr, error) {
    	return []netip.Addr{}, errors.New("not implemented on this platform")
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. cni/pkg/ipset/nldeps_mock.go

    	return args.Error(0)
    }
    
    func (m *MockedIpsetDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	args := m.Called(name, ip)
    	return args.Error(0)
    }
    
    func (m *MockedIpsetDeps) listEntriesByIP(name string) ([]netip.Addr, error) {
    	args := m.Called(name)
    	return args.Get(0).([]netip.Addr), args.Error(1)
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. cni/pkg/ipset/ipset.go

    	destroySet(name string) error
    	addIP(name string, ip netip.Addr, ipProto uint8, comment string, replace bool) error
    	deleteIP(name string, ip netip.Addr, ipProto uint8) error
    	flush(name string) error
    	clearEntriesWithComment(name string, comment string) error
    	clearEntriesWithIP(name string, ip netip.Addr) error
    	listEntriesByIP(name string) ([]netip.Addr, error)
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  7. cni/pkg/ipset/nldeps_linux.go

    }
    
    func (m *realDeps) listEntriesByIP(name string) ([]netip.Addr, error) {
    	var ipList []netip.Addr
    
    	res, err := netlink.IpsetList(name)
    	if err != nil {
    		return ipList, fmt.Errorf("failed to list ipset %s: %w", name, err)
    	}
    
    	for _, entry := range res.Entries {
    		addr, _ := netip.AddrFromSlice(entry.IP)
    		ipList = append(ipList, addr)
    	}
    
    	return ipList, nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/net_test.go

    	ztunnelServer := fixture.ztunnelServer
    	podMeta := metav1.ObjectMeta{
    		Name:      "foo",
    		Namespace: "bar",
    		UID:       "123",
    	}
    	podIP := netip.MustParseAddr("99.9.9.9")
    	podIPs := []netip.Addr{podIP}
    
    	fixture.ipsetDeps.On("addIP",
    		"foo-v4",
    		netip.MustParseAddr("99.9.9.9"),
    		uint8(unix.IPPROTO_TCP),
    		string(podMeta.UID),
    		true,
    	).Return(nil)
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/ztunnel/configdump/connections.go

    		workloadNames[ip] = s.Name + "." + s.Namespace
    	}
    	lookupIP := func(addr string) string {
    		if filter.Raw {
    			return addr
    		}
    		ip, port, _ := net.SplitHostPort(addr)
    		if s, f := serviceNames[ip]; f {
    			return net.JoinHostPort(s, port)
    		}
    		if w, f := workloadNames[ip]; f {
    			return net.JoinHostPort(w, port)
    		}
    		return addr
    	}
    	fmt.Fprintln(w, "WORKLOAD\tDIRECTION\tLOCAL\tREMOTE\tREMOTE TARGET")
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Apr 22 15:39:28 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/net.go

    	}
    
    	return nil
    }
    
    func pruneHostIPset(expected sets.Set[netip.Addr], hostsideProbeSet *ipset.IPSet) error {
    	actualIPSetContents, err := hostsideProbeSet.ListEntriesByIP()
    	if err != nil {
    		log.Warnf("unable to list IPSet: %v", err)
    		return err
    	}
    	actual := sets.New[netip.Addr](actualIPSetContents...)
    	stales := actual.DifferenceInPlace(expected)
    
    	for staleIP := range stales {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 12.2K bytes
    - Viewed (1)
Back to top