netns_unspecified.go 727 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // +build !linux
  2. package netns
  3. import (
  4. "errors"
  5. )
  6. var (
  7. ErrNotImplemented = errors.New("not implemented")
  8. )
  9. func Set(ns NsHandle) (err error) {
  10. return ErrNotImplemented
  11. }
  12. func New() (ns NsHandle, err error) {
  13. return -1, ErrNotImplemented
  14. }
  15. func Get() (NsHandle, error) {
  16. return -1, ErrNotImplemented
  17. }
  18. func GetFromPath(path string) (NsHandle, error) {
  19. return -1, ErrNotImplemented
  20. }
  21. func GetFromName(name string) (NsHandle, error) {
  22. return -1, ErrNotImplemented
  23. }
  24. func GetFromPid(pid int) (NsHandle, error) {
  25. return -1, ErrNotImplemented
  26. }
  27. func GetFromThread(pid, tid int) (NsHandle, error) {
  28. return -1, ErrNotImplemented
  29. }
  30. func GetFromDocker(id string) (NsHandle, error) {
  31. return -1, ErrNotImplemented
  32. }