MCPcopy Create free account
hub / github.com/containerd/nerdctl / WithNamespace

Function WithNamespace

pkg/netutil/netutil.go:215–224  ·  view source on GitHub ↗
(namespace string)

Source from the content-addressed store, hash-verified

213}
214
215func WithNamespace(namespace string) CNIEnvOpt {
216 return func(e *CNIEnv) error {
217 err := fsEnsureRoot(e, namespace)
218 if err != nil {
219 return err
220 }
221 e.Namespace = namespace
222 return nil
223 }
224}
225
226func NewCNIEnv(cniPath, cniConfPath string, opts ...CNIEnvOpt) (*CNIEnv, error) {
227 e := CNIEnv{

Callers 12

VerifyNetworkOptionsMethod · 0.92
VerifyNetworkOptionsMethod · 0.92
getCNIMethod · 0.92
cleanupNetworkFunction · 0.92
InspectFunction · 0.92
RemoveFunction · 0.92
PruneFunction · 0.92
CreateFunction · 0.92
ListFunction · 0.92
NewFunction · 0.92
newHandlerOptsFunction · 0.92
NetworkNamesFunction · 0.92

Calls 1

fsEnsureRootFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…