File: netns_freebsd.go

package info (click to toggle)
golang-github-containers-common 0.64.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,932 kB
  • sloc: makefile: 132; sh: 111
file content (33 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package rootlessnetns

import (
	"errors"

	"github.com/containers/common/libnetwork/types"
	"github.com/containers/common/pkg/config"
	"github.com/containers/storage/pkg/lockfile"
)

var ErrNotSupported = errors.New("rootless netns only supported on linux")

type Netns struct{}

func New(dir string, backend NetworkBackend, conf *config.Config) (*Netns, error) {
	return nil, ErrNotSupported
}

func (n *Netns) Setup(nets int, toRun func() error) error {
	return ErrNotSupported
}

func (n *Netns) Teardown(nets int, toRun func() error) error {
	return ErrNotSupported
}

func (n *Netns) Run(lock *lockfile.LockFile, toRun func() error) error {
	return ErrNotSupported
}

func (n *Netns) Info() *types.RootlessNetnsInfo {
	return &types.RootlessNetnsInfo{}
}