mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-19 11:20:18 +02:00
Monitor network changes and restart engine on detection (#1904)
This commit is contained in:
15
client/internal/networkmonitor/monitor.go
Normal file
15
client/internal/networkmonitor/monitor.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package networkmonitor
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// NetworkWatcher watches for changes in network configuration.
|
||||
type NetworkWatcher struct {
|
||||
cancel context.CancelFunc
|
||||
}
|
||||
|
||||
// New creates a new network monitor.
|
||||
func New() *NetworkWatcher {
|
||||
return &NetworkWatcher{}
|
||||
}
|
Reference in New Issue
Block a user