diff --git a/healthcheck/diskcheck.go b/healthcheck/diskcheck.go index 7f30b154..087fc7a7 100644 --- a/healthcheck/diskcheck.go +++ b/healthcheck/diskcheck.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris,!netbsd,!openbsd +// +build !windows,!solaris,!netbsd,!openbsd,!js package healthcheck diff --git a/healthcheck/diskcheck_js.go b/healthcheck/diskcheck_js.go new file mode 100644 index 00000000..4a2f4f57 --- /dev/null +++ b/healthcheck/diskcheck_js.go @@ -0,0 +1,13 @@ +package healthcheck + +// AvailableDiskSpaceRatio returns ratio of available disk space to total +// capacity. +func AvailableDiskSpaceRatio(path string) (float64, error) { + return 0, fmt.Errorf("disk space check not supported in WebAssembly") +} + +// AvailableDiskSpace returns the available disk space in bytes of the given +// file system. +func AvailableDiskSpace(path string) (uint64, error) { + return 0, fmt.Errorf("disk space check not supported in WebAssembly") +}