Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added noop operations for js/wasm build target #478

Merged
merged 2 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions internal/sysinfo/memtotal_js.go
Original file line number Diff line number Diff line change
@@ -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")
}
13 changes: 13 additions & 0 deletions internal/sysinfo/usage_js.go
Original file line number Diff line number Diff line change
@@ -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")
}
2 changes: 1 addition & 1 deletion internal/sysinfo/usage_posix.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down