Commented on stop-gap data structure
This commit is contained in:
1 parent
bce06d2e9b
commit
1b0066cc98
1 file changed
+2
-1
+2
-1
@@ -21,6 +21,8 @@ type Record struct {
|
||||
Subnet *net.IPNet
|
||||
}
|
||||
|
||||
// Very simple data structure for now, with linear searching.
|
||||
// TODO: make more sophisticated to improve performance.
|
||||
type ZoneDb struct {
|
||||
mx sync.RWMutex
|
||||
recs []Record
|
||||
@@ -42,7 +44,6 @@ func (err DuplicateError) Error() string {
|
||||
return "Duplicate " + err.Name + "," + err.WeaveIp.String() + " in container " + err.Ident
|
||||
}
|
||||
|
||||
// Stop gap.
|
||||
func (zone *ZoneDb) match(name string) (net.IP, error) {
|
||||
for _, r := range zone.recs {
|
||||
if r.Name == name {
|
||||
|
||||
Reference in new issue
Block a user