- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for addOffsetAddress (0.09 sec)
-
pkg/registry/core/service/ipallocator/ipallocator.go
func (dry dryRunAllocator) Destroy() { } func (dry dryRunAllocator) EnableMetrics() { } // addOffsetAddress returns the address at the provided offset within the subnet // TODO: move it to k8s.io/utils/net, this is the same as current AddIPOffset() // but using netip.Addr instead of net.IP func addOffsetAddress(address netip.Addr, offset uint64) (netip.Addr, error) { addressBytes := address.AsSlice()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/ipallocator_test.go
offset: 1025, want: netip.MustParseAddr("fd00:1:2:3::401"), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := addOffsetAddress(tt.address, tt.offset) if !reflect.DeepEqual(got, tt.want) || err != nil { t.Errorf("offsetAddress() = %v, want %v", got, tt.want) } // double check to avoid mistakes on the hardcoded values
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jun 25 13:14:46 UTC 2023 - 24.2K bytes - Viewed (0)