refactor: Introduce IPAM config object

This commit is contained in:
Adam Harrison committed 2016-03-14 17:41:20 +00:00
1 parent 2a10182cf6
commit 2eeb754454
3 files changed
+31 -11

No files matched your search

+4 -2
View File
@@ -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
}