MCPcopy
hub / github.com/moby/moby / NetnsPath

Method NetnsPath

daemon/libnetwork/sandbox_linux.go:214–222  ·  view source on GitHub ↗

NetnsPath returns the network namespace's path and true, if a network has been created - else the empty string and false.

()

Source from the content-addressed store, hash-verified

212// NetnsPath returns the network namespace's path and true, if a network has been
213// created - else the empty string and false.
214func (sb *Sandbox) NetnsPath() (path string, ok bool) {
215 sb.mu.Lock()
216 osSbox := sb.osSbox
217 sb.mu.Unlock()
218 if osSbox == nil {
219 return "", false
220 }
221 return osSbox.Key(), true
222}
223
224// IPv6Enabled determines whether a container supports IPv6.
225// IPv6 support can always be determined for host networking. For other network

Callers

nothing calls this directly

Calls 3

UnlockMethod · 0.80
KeyMethod · 0.65
LockMethod · 0.45

Tested by

no test coverage detected