MCPcopy Index your code
hub / github.com/docker/cli / isSocket

Function isSocket

cli/context/docker/load.go:143–150  ·  view source on GitHub ↗

isSocket checks if the given address is a Unix-socket (linux), named pipe (Windows), or file-descriptor.

(addr string)

Source from the content-addressed store, hash-verified

141// isSocket checks if the given address is a Unix-socket (linux),
142// named pipe (Windows), or file-descriptor.
143func isSocket(addr string) bool {
144 switch proto, _, _ := strings.Cut(addr, "://"); proto {
145 case "unix", "npipe", "fd":
146 return true
147 default:
148 return false
149 }
150}
151
152// EndpointFromContext parses a context docker endpoint metadata into a typed EndpointMeta structure
153func EndpointFromContext(metadata store.Metadata) (EndpointMeta, error) {

Callers 1

ClientOptsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…