ServeWindows makes the handler to listen for request in a Windows named pipe. It also creates the spec file in the right directory for docker to read. Due to constrains for running Docker in Docker on Windows, data-root directory of docker daemon must be provided. To get default directory, use Windo
(addr, pluginName, daemonDir string, pipeConfig *WindowsPipeConfig)
| 72 | // of docker daemon must be provided. To get default directory, use |
| 73 | // WindowsDefaultDaemonRootDir() function. On Unix, this parameter is ignored. |
| 74 | func (h Handler) ServeWindows(addr, pluginName, daemonDir string, pipeConfig *WindowsPipeConfig) error { |
| 75 | l, spec, err := newWindowsListener(addr, pluginName, daemonDir, pipeConfig) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | if spec != "" { |
| 80 | defer os.Remove(spec) |
| 81 | } |
| 82 | return h.Serve(l) |
| 83 | } |
| 84 | |
| 85 | // HandleFunc registers a function to handle a request path with. |
| 86 | func (h Handler) HandleFunc(path string, fn func(w http.ResponseWriter, r *http.Request)) { |
nothing calls this directly
no test coverage detected