MCPcopy
hub / github.com/cilium/cilium / WithMax

Function WithMax

pkg/allocator/allocator.go:392–394  ·  view source on GitHub ↗

WithMax sets the maximum identifier to be allocated

(id idpool.ID)

Source from the content-addressed store, hash-verified

390
391// WithMax sets the maximum identifier to be allocated
392func WithMax(id idpool.ID) AllocatorOption {
393 return func(a *Allocator) { a.max = id }
394}
395
396// WithPrefixMask sets the prefix used for all ID allocations. If set, the mask
397// will be ORed to all selected IDs prior to allocation. It is the

Callers 10

BenchmarkAllocateFunction · 0.92
TestAllocateCachedFunction · 0.92
TestRemoteCacheFunction · 0.92
TestSelectIDFunction · 0.85
TestPrefixMaskFunction · 0.85
testAllocatorFunction · 0.85
TestSyncLocalKeysFunction · 0.85

Calls

no outgoing calls

Tested by 10

BenchmarkAllocateFunction · 0.74
TestAllocateCachedFunction · 0.74
TestRemoteCacheFunction · 0.74
TestSelectIDFunction · 0.68
TestPrefixMaskFunction · 0.68
testAllocatorFunction · 0.68
TestSyncLocalKeysFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…