mirror of
https://github.com/docker/cli.git
synced 2026-09-25 07:50:37 -05:00
Register built-in engine commands at runtime instead of compile-time
This allows selective loading of commands, and paves the way to dynamic plugins. Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes) Upstream-commit: 919665a20a41f8e1b105342b1864ec05eb50cc97 Component: engine
This commit is contained in:
@@ -50,10 +50,6 @@ func ValidateHost(val string) (string, error) {
|
||||
|
||||
type HttpApiFunc func(eng *engine.Engine, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error
|
||||
|
||||
func init() {
|
||||
engine.Register("serveapi", ServeApi)
|
||||
}
|
||||
|
||||
func hijackServer(w http.ResponseWriter) (io.ReadCloser, io.Writer, error) {
|
||||
conn, _, err := w.(http.Hijacker).Hijack()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user