Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for calculateRangeOffset (0.15 sec)

  1. pkg/registry/core/service/portallocator/allocator_test.go

    					Base: 30000,
    					Size: 8192,
    				},
    			},
    			want: 128,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := calculateRangeOffset(tt.args.pr); got != tt.want {
    				t.Errorf("calculateRangeOffset() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func TestNodePortMetrics(t *testing.T) {
    	clearMetrics()
    	// create node port allocator
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/ipallocator.go

    	if family == api.IPv4Protocol {
    		ipLast = ipLast.Prev()
    	}
    	// KEP-3070: Reserve Service IP Ranges For Dynamic and Static IP Allocation
    	// calculate the subrange offset
    	rangeOffset := calculateRangeOffset(cidr)
    	offsetAddress, err := addOffsetAddress(ipFirst, uint64(rangeOffset))
    	if err != nil {
    		return nil, err
    	}
    	a := &Allocator{
    		cidr:            cidr,
    		prefix:          prefix,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
Back to top