mem_fallback.go 931 B

12345678910111213141516171819202122232425262728293031323334
  1. //go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !plan9 && !aix
  2. // +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows,!plan9,!aix
  3. package mem
  4. import (
  5. "context"
  6. "github.com/shirou/gopsutil/v3/internal/common"
  7. )
  8. func VirtualMemory() (*VirtualMemoryStat, error) {
  9. return VirtualMemoryWithContext(context.Background())
  10. }
  11. func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
  12. return nil, common.ErrNotImplementedError
  13. }
  14. func SwapMemory() (*SwapMemoryStat, error) {
  15. return SwapMemoryWithContext(context.Background())
  16. }
  17. func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
  18. return nil, common.ErrNotImplementedError
  19. }
  20. func SwapDevices() ([]*SwapDevice, error) {
  21. return SwapDevicesWithContext(context.Background())
  22. }
  23. func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) {
  24. return nil, common.ErrNotImplementedError
  25. }