diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index 5833ca6a3..76cb87fac 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -24,6 +24,7 @@ import ( "github.com/netbirdio/netbird/client/internal/peer/id" "github.com/netbirdio/netbird/client/internal/peer/state_dump" "github.com/netbirdio/netbird/client/internal/peer/status" + "github.com/netbirdio/netbird/client/internal/peer/wg_watcher" "github.com/netbirdio/netbird/client/internal/peer/worker" "github.com/netbirdio/netbird/client/internal/portforward" "github.com/netbirdio/netbird/client/internal/rosenpass" @@ -138,7 +139,7 @@ type Conn struct { relayDialInFlight bool pendingRelayOffer *OfferAnswer - wgWatcher *WGWatcher + wgWatcher *wg_watcher.WGWatcher wgWatcherWg sync.WaitGroup wgWatcherCancel context.CancelFunc // wgTimeouts counts consecutive WireGuard handshake timeouts without a @@ -192,7 +193,7 @@ func NewConn(config ConnConfig, services ServiceDependencies) (*Conn, error) { statusICE: worker.NewAtomicStatus(), dumpState: dumpState, endpointUpdater: NewEndpointUpdater(connLog, config.WgConfig, isController(config)), - wgWatcher: NewWGWatcher(connLog, config.WgConfig.WgInterface, config.Key, dumpState), + wgWatcher: wg_watcher.NewWGWatcher(connLog, config.WgConfig.WgInterface, config.Key, dumpState), metricsRecorder: services.MetricsRecorder, } diff --git a/client/internal/peer/wg_watcher.go b/client/internal/peer/wg_watcher/wg_watcher.go similarity index 99% rename from client/internal/peer/wg_watcher.go rename to client/internal/peer/wg_watcher/wg_watcher.go index f09cf1098..448f148be 100644 --- a/client/internal/peer/wg_watcher.go +++ b/client/internal/peer/wg_watcher/wg_watcher.go @@ -1,4 +1,4 @@ -package peer +package wg_watcher import ( "context" diff --git a/client/internal/peer/wg_watcher_test.go b/client/internal/peer/wg_watcher/wg_watcher_test.go similarity index 99% rename from client/internal/peer/wg_watcher_test.go rename to client/internal/peer/wg_watcher/wg_watcher_test.go index c76337fd8..af89e3f0b 100644 --- a/client/internal/peer/wg_watcher_test.go +++ b/client/internal/peer/wg_watcher/wg_watcher_test.go @@ -1,4 +1,4 @@ -package peer +package wg_watcher import ( "context"