Files
Reims-Go/internal/host/host_other.go
T
Nwflower 14f72889dd Merge pull request #10 from Dnyo666/feat/i18n-l10n-v2
Resolve merge conflicts with main in frontend/src/i18n.ts and internal/i18n/i18n.go, migrate the 12 i18n keys added on main since branching (CoW backing chain diagnostics and About open-source license viewer) into locales/{zh-CN,en-US}/*.json, and regenerate catalogs via cmd/i18ngen.
2026-11-30 00:18:19 -07:00

51 lines
1.6 KiB
Go

//go:build !windows
package host
import (
"fmt"
"runtime"
)
// Inspect returns basic host facts on non-Windows dev machines (e.g., macOS).
func Inspect(dataRoot string) Report {
displays := probeDisplays()
primary := PrimaryDisplayOf(displays)
presets, rec := RecommendDisplayPresets(primary)
return Report{
OS: runtime.GOOS,
Arch: runtime.GOARCH,
LogicalCPUs: runtime.NumCPU(),
CPUTopology: DefaultCPUTopology(runtime.NumCPU()),
DataRoot: dataRoot,
DeepBackingChains: InspectVMDiskChains(dataRoot),
WHPX: WHPXUnsupported,
Displays: displays,
PrimaryDisplay: primary,
RecommendedResolution: rec,
DisplayPresets: presets,
ProcessorScheduling: probeProcessorScheduling(),
Audio: ProbeAudio(),
}
}
func PinProcessToPCores(pid uint32, mask uint64) error {
return SetProcessAffinityMask(pid, mask)
}
func SetProcessAffinityMask(pid uint32, mask uint64) error {
return fmt.Errorf("process CPU affinity is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func GetProcessAffinityMask(pid uint32) (uint64, uint64, error) {
return 0, 0, fmt.Errorf("process CPU affinity is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func DisableProcessPowerThrottling(pid uint32) error {
return fmt.Errorf("process power throttling control is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func EnableWHPXElevated() error {
return fmt.Errorf("WHPX elevation is only supported on Windows (current OS: %s)", runtime.GOOS)
}