mem_fallback.go 821 B

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