diff --git a/internal/sysinfo/memtotal_js.go b/internal/sysinfo/memtotal_js.go new file mode 100644 index 000000000..45ff92792 --- /dev/null +++ b/internal/sysinfo/memtotal_js.go @@ -0,0 +1,13 @@ +// Copyright 2020 New Relic Corporation. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build js && wasm + +package sysinfo + +import "errors" + +// PhysicalMemoryBytes returns the total amount of host memory. +func PhysicalMemoryBytes() (uint64, error) { + return 0, errors.New("unsupported js/wasm arch") +} diff --git a/internal/sysinfo/usage_js.go b/internal/sysinfo/usage_js.go new file mode 100644 index 000000000..8b19bc296 --- /dev/null +++ b/internal/sysinfo/usage_js.go @@ -0,0 +1,13 @@ +// Copyright 2020 New Relic Corporation. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build js && wasm + +package sysinfo + +import "errors" + +// GetUsage gathers process times. +func GetUsage() (Usage, error) { + return Usage{}, errors.New("unsupported js/wasm arch") +} diff --git a/internal/sysinfo/usage_posix.go b/internal/sysinfo/usage_posix.go index 4d758dea1..335261f3c 100644 --- a/internal/sysinfo/usage_posix.go +++ b/internal/sysinfo/usage_posix.go @@ -1,7 +1,7 @@ // Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -// +build !windows +//go:build !windows && !(js && wasm) package sysinfo