- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewInMemory (0.24 sec)
-
pkg/registry/core/service/portallocator/allocator_test.go
} otherPr, err := net.ParsePortRange("200-300") if err != nil { t.Fatal(err) } _, err = NewInMemory(*otherPr) if err != nil { t.Fatal(err) } if err := r.Restore(*otherPr, dst.Data); err != ErrMismatchedNetwork { t.Fatal(err) } other, err := NewInMemory(*pr2) if err != nil { t.Fatal(err) } if err := other.Restore(*pr2, dst.Data); err != nil { t.Fatal(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 14K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/allocator.go
} var err error a.alloc, err = allocatorFactory(max, rangeSpec, calculateRangeOffset(pr)) if err != nil { return nil, err } return a, err } // NewInMemory creates an in-memory allocator. func NewInMemory(pr net.PortRange) (*PortAllocator, error) { return New(pr, func(max int, rangeSpec string, offset int) (allocator.Interface, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 7.4K bytes - Viewed (0) -
pkg/registry/core/service/storage/storage_test.go
} func makeIPAllocator(cidr *net.IPNet) ipallocator.Interface { al, err := ipallocator.NewInMemory(cidr) if err != nil { panic(fmt.Sprintf("error creating IP allocator: %v", err)) } return al } func makePortAllocator(ports machineryutilnet.PortRange) portallocator.Interface { al, err := portallocator.NewInMemory(ports) if err != nil { panic(fmt.Sprintf("error creating port allocator: %v", err)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 440.2K bytes - Viewed (0)