...

Source file src/github.com/vishvananda/netns/netns_others.go

Documentation: github.com/vishvananda/netns

     1  //go:build !linux
     2  // +build !linux
     3  
     4  package netns
     5  
     6  import (
     7  	"errors"
     8  )
     9  
    10  var (
    11  	ErrNotImplemented = errors.New("not implemented")
    12  )
    13  
    14  // Setns sets namespace using golang.org/x/sys/unix.Setns on Linux. It
    15  // is not implemented on other platforms.
    16  //
    17  // Deprecated: Use golang.org/x/sys/unix.Setns instead.
    18  func Setns(ns NsHandle, nstype int) (err error) {
    19  	return ErrNotImplemented
    20  }
    21  
    22  func Set(ns NsHandle) (err error) {
    23  	return ErrNotImplemented
    24  }
    25  
    26  func New() (ns NsHandle, err error) {
    27  	return -1, ErrNotImplemented
    28  }
    29  
    30  func NewNamed(name string) (NsHandle, error) {
    31  	return -1, ErrNotImplemented
    32  }
    33  
    34  func DeleteNamed(name string) error {
    35  	return ErrNotImplemented
    36  }
    37  
    38  func Get() (NsHandle, error) {
    39  	return -1, ErrNotImplemented
    40  }
    41  
    42  func GetFromPath(path string) (NsHandle, error) {
    43  	return -1, ErrNotImplemented
    44  }
    45  
    46  func GetFromName(name string) (NsHandle, error) {
    47  	return -1, ErrNotImplemented
    48  }
    49  
    50  func GetFromPid(pid int) (NsHandle, error) {
    51  	return -1, ErrNotImplemented
    52  }
    53  
    54  func GetFromThread(pid, tid int) (NsHandle, error) {
    55  	return -1, ErrNotImplemented
    56  }
    57  
    58  func GetFromDocker(id string) (NsHandle, error) {
    59  	return -1, ErrNotImplemented
    60  }
    61  

View as plain text