fix purego build errors on non-supported architectures

This commit is contained in:
henrygd
2026-01-11 17:48:19 -05:00
parent 42c3ca5db5
commit 618e5b4cc1
4 changed files with 18 additions and 4 deletions

View File

@@ -1,9 +1,21 @@
//go:build !linux && !windows
//go:build (!linux && !windows) || (!amd64 && !arm64)
package agent
import "fmt"
type nvmlCollector struct {
gm *GPUManager
}
func (c *nvmlCollector) init() error {
return fmt.Errorf("nvml not supported on this platform")
}
func (c *nvmlCollector) start() {}
func (c *nvmlCollector) collect() {}
func openLibrary(name string) (uintptr, error) {
return 0, fmt.Errorf("nvml not supported on this platform")
}