github.com/go/docker@v1.12.0-rc2/cmd/docker/daemon.go (about) 1 package main 2 3 const daemonBinary = "dockerd" 4 5 // DaemonProxy acts as a cli.Handler to proxy calls to the daemon binary 6 type DaemonProxy struct{} 7 8 // NewDaemonProxy returns a new handler 9 func NewDaemonProxy() DaemonProxy { 10 return DaemonProxy{} 11 } 12 13 // Command returns a cli command handler if one exists 14 func (p DaemonProxy) Command(name string) func(...string) error { 15 return map[string]func(...string) error{ 16 "daemon": p.CmdDaemon, 17 }[name] 18 }