starting engine by passing file descriptor on engine start

This commit is contained in:
Pascal Fischer
2023-08-09 15:21:53 +02:00
parent a9b9b3fa0a
commit 7f7e10121d
20 changed files with 913 additions and 12 deletions

View File

@@ -1,3 +1,6 @@
//go:build !ios
// +build !ios
package system
import (

30
client/system/info_ios.go Normal file
View File

@@ -0,0 +1,30 @@
//go:build ios
// +build ios
package system
import (
"context"
"os"
"runtime"
"github.com/netbirdio/netbird/version"
)
// GetInfo retrieves and parses the system information
func GetInfo(ctx context.Context) *Info {
// Convert fixed-size byte arrays to Go strings
sysName := "iOS"
machine := "machine"
release := "release"
swversion := "swversion"
gio := &Info{Kernel: sysName, OSVersion: swversion, Core: release, Platform: machine, OS: sysName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU()}
systemHostname, _ := os.Hostname()
gio.Hostname = extractDeviceName(ctx, systemHostname)
gio.WiretrusteeVersion = version.NetbirdVersion()
gio.UIVersion = extractUserAgent(ctx)
return gio
}