diff --git a/libnetwork/sandbox/interface_freebsd.go b/libnetwork/sandbox/interface_freebsd.go new file mode 100644 index 0000000000..115290d82b --- /dev/null +++ b/libnetwork/sandbox/interface_freebsd.go @@ -0,0 +1,4 @@ +package sandbox + +// IfaceOption is a function option type to set interface options +type IfaceOption func() diff --git a/libnetwork/sandbox/namespace_unsupported.go b/libnetwork/sandbox/namespace_unsupported.go index 247f4fb7b4..9d38206bd7 100644 --- a/libnetwork/sandbox/namespace_unsupported.go +++ b/libnetwork/sandbox/namespace_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!freebsd package sandbox diff --git a/libnetwork/sandbox/neigh_freebsd.go b/libnetwork/sandbox/neigh_freebsd.go new file mode 100644 index 0000000000..58b30587e2 --- /dev/null +++ b/libnetwork/sandbox/neigh_freebsd.go @@ -0,0 +1,4 @@ +package sandbox + +// NeighOption is a function option type to set neighbor options +type NeighOption func() diff --git a/libnetwork/sandbox/sandbox_freebsd.go b/libnetwork/sandbox/sandbox_freebsd.go new file mode 100644 index 0000000000..4aa7787113 --- /dev/null +++ b/libnetwork/sandbox/sandbox_freebsd.go @@ -0,0 +1,23 @@ +package sandbox + +// GenerateKey generates a sandbox key based on the passed +// container id. +func GenerateKey(containerID string) string { + maxLen := 12 + if len(containerID) < maxLen { + maxLen = len(containerID) + } + + return containerID[:maxLen] +} + +// NewSandbox provides a new sandbox instance created in an os specific way +// provided a key which uniquely identifies the sandbox +func NewSandbox(key string, osCreate bool) (Sandbox, error) { + return nil, nil +} + +// GC triggers garbage collection of namespace path right away +// and waits for it. +func GC() { +} diff --git a/libnetwork/sandbox/sandbox_unsupported.go b/libnetwork/sandbox/sandbox_unsupported.go index efda42a4a6..4ed3c9f58b 100644 --- a/libnetwork/sandbox/sandbox_unsupported.go +++ b/libnetwork/sandbox/sandbox_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!freebsd package sandbox