mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
Update vendor
This commit is contained in:
28
vendor/github.com/docker/containerd/supervisor/get_containers.go
generated
vendored
Normal file
28
vendor/github.com/docker/containerd/supervisor/get_containers.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package supervisor
|
||||
|
||||
import "github.com/docker/containerd/runtime"
|
||||
|
||||
type GetContainersTask struct {
|
||||
baseTask
|
||||
ID string
|
||||
Containers []runtime.Container
|
||||
}
|
||||
|
||||
func (s *Supervisor) getContainers(t *GetContainersTask) error {
|
||||
|
||||
if t.ID != "" {
|
||||
ci, ok := s.containers[t.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
t.Containers = append(t.Containers, ci.container)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, ci := range s.containers {
|
||||
t.Containers = append(t.Containers, ci.container)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user