mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-05 00:44:10 -04:00
A macOS-specific sleep detection mechanism using IOKit and CoreFoundation via cgo is introduced, with a fallback implementation for unsupported platforms. A public Service wrapper provides an event-driven API translating system sleep/wake events into gRPC calls. The UI client integrates sleep detection to manage connectivity state based on system sleep status.
10 lines
161 B
Go
10 lines
161 B
Go
//go:build !darwin || ios
|
|
|
|
package sleep
|
|
|
|
import "fmt"
|
|
|
|
func NewDetector() (detector, error) {
|
|
return nil, fmt.Errorf("sleep not supported on this platform")
|
|
}
|