Extern LocalRangeTracker interface with String method

Cleaner approach than passing a tracker name to ipam/http.
This commit is contained in:
Martynas Pumputis committed 2018-06-04 14:08:24 +02:00
1 parent 21fb953d0f
commit 62c30d9130
6 files changed
+13 -6

No files matched your search

+2
View File
@@ -74,6 +74,7 @@ type Allocator struct {
isKnownPeer func(mesh.PeerName) bool
quorum func() uint
now func() time.Time
tracker tracker.LocalRangeTracker
}
// PreClaims are IP addresses discovered before we could initialize IPAM
@@ -130,6 +131,7 @@ func NewAllocator(config Config) *Allocator {
quorum: config.Quorum,
dead: make(map[string]time.Time),
now: time.Now,
tracker: config.Tracker,
}
alloc.pendingClaims = make([]operation, len(config.PreClaims))