- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TopLevelPrefixes (0.18 sec)
-
pkg/util/iptree/iptree.go
} return t.topLevelPrefixes(t.rootV4) } // topLevelPrefixes is used to return a map with all the Top Level prefixes and its values func (t *Tree[T]) topLevelPrefixes(root *node[T]) map[string]T { result := map[string]T{} queue := []*node[T]{root} for len(queue) > 0 { n := queue[0] queue = queue[1:] // store and continue, only interested on the top level prefixes if n.public {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.7K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/cidrallocator.go
// get A so we can spread the load of IPs randomly. // However, we need to validate the best strategy before going to Beta. isIPv6 := c.ipFamily == api.IPFamily(v1.IPv6Protocol) for _, allocator := range c.tree.TopLevelPrefixes(isIPv6) { ip, err := allocator.AllocateNextService(service) if err == nil { return ip, nil } } return nil, ErrFull } func (c *MetaAllocator) AllocateNext() (net.IP, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 13.2K bytes - Viewed (0) -
pkg/util/iptree/iptree_test.go
} if r.Len(false) != len(keys) { t.Fatalf("bad len: %v %v", r.Len(false), len(keys)) } expected := []string{ "10.0.0.0/8", "192.168.0.0/20", "172.16.0.0/12", } parents := r.TopLevelPrefixes(false) if len(parents) != len(expected) { t.Fatalf("bad len: %v %v", len(parents), len(expected)) } for _, k := range expected { v, ok := parents[k] if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.8K bytes - Viewed (0)