containerd/vendor/github.com/mdlayher/socket/netns_others.go
Abel Feng 522130a667 sandbox: support vsock connection to task api
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-22 01:36:38 +00:00

15 lines
304 B
Go

//go:build !linux
// +build !linux
package socket
import (
"fmt"
"runtime"
)
// withNetNS returns an error on non-Linux systems.
func withNetNS(_ int, _ func() (*Conn, error)) (*Conn, error) {
return nil, fmt.Errorf("socket: Linux network namespace support is not available on %s", runtime.GOOS)
}