Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 377 for asSlice (0.26 sec)

  1. pilot/pkg/serviceregistry/kube/controller/ambient/workloads_test.go

    			},
    			result: &workloadapi.Workload{
    				Uid:               "cluster0//Pod/ns/name",
    				Name:              "name",
    				Namespace:         "ns",
    				Addresses:         [][]byte{netip.AddrFrom4([4]byte{1, 2, 3, 4}).AsSlice()},
    				Network:           testNW,
    				CanonicalName:     "name",
    				CanonicalRevision: "latest",
    				WorkloadType:      workloadapi.WorkloadType_POD,
    				WorkloadName:      "name",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. pkg/util/iptree/iptree.go

    		return 1
    	}
    	return 0
    }
    
    // find the common subnet, aka the one with the common prefix
    func findAncestor(a, b netip.Prefix) netip.Prefix {
    	bytesA := a.Addr().AsSlice()
    	bytesB := b.Addr().AsSlice()
    	bytes := make([]byte, len(bytesA))
    
    	max := a.Bits()
    	if l := b.Bits(); l < max {
    		max = l
    	}
    
    	mask := 0
    	for i := range bytesA {
    		xor := bytesA[i] ^ bytesB[i]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17.7K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go

    			TrustDomain:           pickTrustDomain(meshCfg),
    			Locality:              getWorkloadEntryLocality(&wle.Spec),
    		}
    
    		if addr, err := netip.ParseAddr(wle.Spec.Address); err == nil {
    			w.Addresses = [][]byte{addr.AsSlice()}
    		} else {
    			log.Warnf("skipping workload entry %s/%s; DNS Address resolution is not yet implemented", wle.Namespace, wle.Name)
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  4. pkg/registry/core/service/ipallocator/ipallocator.go

    		// swallow the error and try with the next IP address
    		if err != nil {
    			klog.Infof("can not create IPAddress %s: %v", name, err)
    			continue
    		}
    		return ip.AsSlice(), nil
    	}
    	return net.IP{}, ErrFull
    }
    
    // Release releases the IP back to the pool. Releasing an
    // unallocated IP or an IP out of the range is a no-op and
    // returns no error.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex_workloadentry_test.go

    	// We should now see the waypoint service IP
    	assert.Equal(t,
    		s.lookup(s.addrXdsName("127.0.0.3"))[0].Address.GetWorkload().Waypoint.GetAddress().Address,
    		netip.MustParseAddr("10.0.0.2").AsSlice())
    
    	// Add another one, expect the same result
    	s.addPods(t, "127.0.0.201", "waypoint2-ns-pod", "namespace-wide",
    		map[string]string{
    			constants.ManagedGatewayLabel: constants.ManagedGatewayMeshControllerLabel,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 01:04:50 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex_serviceentry_test.go

    }
    
    func parseIP(ip string) []byte {
    	addr, err := netip.ParseAddr(ip)
    	if err != nil {
    		return nil
    	}
    	return addr.AsSlice()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 27 03:01:04 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  7. pkg/dns/client/dns.go

    // a takes a slice of ip string and returns a slice of A RRs.
    func a(host string, ips []netip.Addr) []dns.RR {
    	answers := make([]dns.RR, len(ips))
    	for i, ip := range ips {
    		r := new(dns.A)
    		r.Hdr = dns.RR_Header{Name: host, Rrtype: dns.TypeA, Class: dns.ClassINET, Ttl: defaultTTLInSeconds}
    		r.A = ip.AsSlice()
    		answers[i] = r
    	}
    	return answers
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 29 16:17:34 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  8. src/net/cgo_unix.go

    	ip, err := netip.ParseAddr(addr)
    	if err != nil {
    		return nil, &DNSError{Err: "invalid address", Name: addr}
    	}
    	sa, salen := cgoSockaddr(IP(ip.AsSlice()), ip.Zone())
    	if sa == nil {
    		return nil, &DNSError{Err: "invalid address " + ip.String(), Name: addr}
    	}
    
    	return doBlockingWithCtx(ctx, addr, func() ([]string, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  9. api/go1.18.txt

    pkg net/netip, method (Addr) AppendTo([]uint8) []uint8
    pkg net/netip, method (Addr) As16() [16]uint8
    pkg net/netip, method (Addr) As4() [4]uint8
    pkg net/netip, method (Addr) AsSlice() []uint8
    pkg net/netip, method (Addr) BitLen() int
    pkg net/netip, method (Addr) Compare(Addr) int
    pkg net/netip, method (Addr) Is4() bool
    pkg net/netip, method (Addr) Is4In6() bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  10. src/net/udpsock.go

    // then the returned UDPAddr will contain a nil IP field, indicating an
    // address family-agnostic unspecified address.
    func UDPAddrFromAddrPort(addr netip.AddrPort) *UDPAddr {
    	return &UDPAddr{
    		IP:   addr.Addr().AsSlice(),
    		Zone: addr.Addr().Zone(),
    		Port: int(addr.Port()),
    	}
    }
    
    // An addrPortUDPAddr is a netip.AddrPort-based UDP address that satisfies the Addr interface.
    type addrPortUDPAddr struct {
    	netip.AddrPort
    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