MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / ServeUnix

Method ServeUnix

sdk/handler.go:58–67  ·  view source on GitHub ↗

ServeUnix makes the handler to listen for requests in a unix socket. It also creates the socket file in the right directory for docker to read.

(addr string, gid int)

Source from the content-addressed store, hash-verified

56// ServeUnix makes the handler to listen for requests in a unix socket.
57// It also creates the socket file in the right directory for docker to read.
58func (h Handler) ServeUnix(addr string, gid int) error {
59 l, spec, err := newUnixListener(addr, gid)
60 if err != nil {
61 return err
62 }
63 if spec != "" {
64 defer os.Remove(spec)
65 }
66 return h.Serve(l)
67}
68
69// ServeWindows makes the handler to listen for request in a Windows named pipe.
70// It also creates the spec file in the right directory for docker to read.

Callers

nothing calls this directly

Calls 3

ServeMethod · 0.95
newUnixListenerFunction · 0.70
RemoveMethod · 0.65

Tested by

no test coverage detected