Move "containers" to daemon/list.go

This is part of an effort to break apart the deprecated server/ package

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: d0370076585f506d2f81af3fb3dab56119bdc0e9
Component: engine
This commit is contained in:
Solomon Hykes
2014-07-31 21:26:25 +00:00
committed by Tibor Vass
parent 021f4f3886
commit d37dbe0e16
3 changed files with 19 additions and 21 deletions

View File

@ -161,14 +161,12 @@ func (daemon *Daemon) Install(eng *engine.Engine) error {
if err := eng.Register("top", daemon.ContainerTop); err != nil {
return err
}
if err := eng.Register("containers", daemon.Containers); err != nil {
return err
}
return nil
}
// List returns an array of all containers registered in the daemon.
func (daemon *Daemon) List() []*Container {
return daemon.containers.List()
}
// Get looks for a container by the specified ID or name, and returns it.
// If the container is not found, or if an error occurs, nil is returned.
func (daemon *Daemon) Get(name string) *Container {