More extensive choice of transferee
This commit is contained in:
1 parent
27c5f5f49f
commit
ace372cfc6
4 files changed
+45
-28
No files matched your search
+2
-2
@@ -368,8 +368,8 @@ func createAllocator(router *weave.Router, ipRangeStr string, defaultSubnetStr s
|
||||
Log.Fatalf("IP address allocation default subnet %s does not overlap with allocation range %s", defaultSubnet, ipRange)
|
||||
}
|
||||
}
|
||||
namesFunc := func() map[weave.PeerName]struct{} { return router.Peers.Names() }
|
||||
allocator := ipam.NewAllocator(router.Ourself.Peer.Name, router.Ourself.Peer.UID, router.Ourself.Peer.NickName, ipRange.Range(), quorum, namesFunc)
|
||||
isValidFunc := func(name weave.PeerName) bool { return router.Peers.Fetch(name) != nil }
|
||||
allocator := ipam.NewAllocator(router.Ourself.Peer.Name, router.Ourself.Peer.UID, router.Ourself.Peer.NickName, ipRange.Range(), quorum, isValidFunc)
|
||||
|
||||
allocator.SetInterfaces(router.NewGossip("IPallocation", allocator))
|
||||
allocator.Start()
|
||||
|
||||
Reference in new issue
Block a user