Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for onetmp (0.23 sec)

  1. src/net/netip/netip.go

    // Package netip defines an IP address type that's a small value type.
    // Building on that [Addr] type, the package also defines [AddrPort] (an
    // IP address and a port) and [Prefix] (an IP address and a bit length
    // prefix).
    //
    // Compared to the [net.IP] type, [Addr] type takes less memory, is immutable,
    // and is comparable (supports == and being a map key).
    package netip
    
    import (
    	"cmp"
    	"errors"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  2. pkg/util/iptree/iptree_test.go

    	tests := []struct {
    		name string
    		a    netip.Prefix
    		b    netip.Prefix
    		want netip.Prefix
    	}{
    		{
    			name: "ipv4 direct parent",
    			a:    netip.MustParsePrefix("192.168.0.0/24"),
    			b:    netip.MustParsePrefix("192.168.1.0/24"),
    			want: netip.MustParsePrefix("192.168.0.0/23"),
    		},
    		{
    			name: "ipv4 root parent ",
    			a:    netip.MustParsePrefix("192.168.0.0/24"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  3. pkg/dns/client/dns_test.go

    		},
    		{
    			name:     "success: k8s host - name.namespace",
    			host:     "productpage.ns1.",
    			expected: a("productpage.ns1.", []netip.Addr{netip.MustParseAddr("9.9.9.9")}),
    		},
    		{
    			name:     "success: k8s host - shortname",
    			host:     "productpage.",
    			expected: a("productpage.", []netip.Addr{netip.MustParseAddr("9.9.9.9")}),
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 29 16:17:34 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  4. pkg/registry/core/service/ipallocator/ipallocator_test.go

    	tests := []struct {
    		name   string
    		subnet netip.Prefix
    		want   netip.Addr
    	}{
    		{
    			name:   "ipv4",
    			subnet: netip.MustParsePrefix("192.168.0.0/24"),
    			want:   netip.MustParseAddr("192.168.0.255"),
    		},
    		{
    			name:   "ipv4 no nibble boundary",
    			subnet: netip.MustParsePrefix("10.0.0.0/12"),
    			want:   netip.MustParseAddr("10.15.255.255"),
    		},
    		{
    			name:   "ipv6",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 25 13:14:46 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  5. callbacks/query.go

    										where.Build(&onStmt)
    
    										if onSQL := onStmt.SQL.String(); onSQL != "" {
    											vars := onStmt.Vars
    											for idx, v := range vars {
    												bindvar := strings.Builder{}
    												onStmt.Vars = vars[0 : idx+1]
    												db.Dialector.BindVarTo(&bindvar, &onStmt, v)
    												onSQL = strings.Replace(onSQL, bindvar.String(), "?", 1)
    											}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 09:51:44 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/net_test.go

    	fakeIPSetDeps.On("addIP",
    		"foo-v4",
    		netip.MustParseAddr("99.9.9.9"),
    		ipProto,
    		podUID,
    		false,
    	).Return(nil)
    
    	fakeIPSetDeps.On("addIP",
    		"foo-v4",
    		netip.MustParseAddr("2.2.2.2"),
    		ipProto,
    		podUID,
    		false,
    	).Return(nil)
    
    	podIPs := []netip.Addr{netip.MustParseAddr("99.9.9.9"), netip.MustParseAddr("2.2.2.2")}
    	_, err := addPodToHostNSIpset(pod, podIPs, &set)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 17.8K bytes
    - Viewed (0)
  7. api/go1.18.txt

    pkg net/netip, func AddrFromSlice([]uint8) (Addr, bool)
    pkg net/netip, func AddrPortFrom(Addr, uint16) AddrPort
    pkg net/netip, func IPv4Unspecified() Addr
    pkg net/netip, func IPv6LinkLocalAllNodes() Addr
    pkg net/netip, func IPv6Unspecified() Addr
    pkg net/netip, func MustParseAddr(string) Addr
    pkg net/netip, func MustParseAddrPort(string) AddrPort
    pkg net/netip, func MustParsePrefix(string) Prefix
    pkg net/netip, func ParseAddr(string) (Addr, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  8. pkg/util/iptree/iptree.go

    func New[T any]() *Tree[T] {
    	return &Tree[T]{
    		rootV4: &node[T]{
    			prefix: netip.PrefixFrom(netip.IPv4Unspecified(), 0),
    		},
    		rootV6: &node[T]{
    			prefix: netip.PrefixFrom(netip.IPv6Unspecified(), 0),
    		},
    	}
    }
    
    // GetPrefix returns the stored value and true if the exact prefix exists in the tree.
    func (t *Tree[T]) GetPrefix(prefix netip.Prefix) (T, bool) {
    	var zeroT T
    
    	n := t.rootV4
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17.7K bytes
    - Viewed (0)
  9. pkg/registry/core/service/ipallocator/ipallocator.go

    // It returns an invalid address to indicate it hasfinished.
    func ipIterator(first netip.Addr, last netip.Addr, offset uint64) func() netip.Addr {
    	// There are no modulo operations for IP addresses
    	modulo := func(addr netip.Addr) netip.Addr {
    		if addr.Compare(last) == 1 {
    			return first
    		}
    		return addr
    	}
    	next := func(addr netip.Addr) netip.Addr {
    		return modulo(addr.Next())
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  10. src/net/udpsock.go

    }
    
    // AddrPort returns the UDPAddr a as a netip.AddrPort.
    //
    // If a.Port does not fit in a uint16, it's silently truncated.
    //
    // If a is nil, a zero value is returned.
    func (a *UDPAddr) AddrPort() netip.AddrPort {
    	if a == nil {
    		return netip.AddrPort{}
    	}
    	na, _ := netip.AddrFromSlice(a.IP)
    	na = na.WithZone(a.Zone)
    	return netip.AddrPortFrom(na, uint16(a.Port))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 16:58:25 UTC 2023
    - 11.8K bytes
    - Viewed (0)
Back to top