zones: add ResolvePublicAddresses() ScanOption to prevent early LookupIP calls
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -52,12 +52,16 @@ func (m *Machine) setID() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Machine) scan() error {
|
||||
func (m *Machine) scan(opts *ScanOptions) error {
|
||||
for i := 0; i < RingsCount; i++ {
|
||||
if err := m.tryApplyWireguardConfig(i); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return m.updatePublicAddresses()
|
||||
if !opts.DontResolvePublicAddresses {
|
||||
return m.updatePublicAddresses()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user