refactor: Introduce IPAM config object
This commit is contained in:
1 parent
2a10182cf6
commit
2eeb754454
3 files changed
+31
-11
No files matched your search
@@ -139,8 +139,10 @@ func makeAllocator(name string, cidrStr string, quorum uint) (*Allocator, addres
|
||||
panic(err)
|
||||
}
|
||||
|
||||
alloc := NewAllocator(peername, mesh.PeerUID(rand.Int63()),
|
||||
"nick-"+name, cidr.Range(), quorum, new(mockDB), func(mesh.PeerName) bool { return true })
|
||||
config := Config{peername, mesh.PeerUID(rand.Int63()),
|
||||
"nick-" + name, cidr.Range(), quorum, new(mockDB), func(mesh.PeerName) bool { return true }}
|
||||
|
||||
alloc := NewAllocator(config)
|
||||
|
||||
return alloc, cidr
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user