1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Update vendor

This commit is contained in:
Darren Shepherd
2016-05-31 18:12:52 -07:00
parent 410dfbe0fd
commit a14846152b
1253 changed files with 222820 additions and 15054 deletions

View File

@@ -0,0 +1,33 @@
package supervisor
import (
"time"
"github.com/docker/containerd/runtime"
)
type StatsTask struct {
baseTask
ID string
Stat chan *runtime.Stat
}
func (s *Supervisor) stats(t *StatsTask) error {
start := time.Now()
i, ok := s.containers[t.ID]
if !ok {
return ErrContainerNotFound
}
// TODO: use workers for this
go func() {
s, err := i.container.Stats()
if err != nil {
t.ErrorCh() <- err
return
}
t.ErrorCh() <- nil
t.Stat <- s
ContainerStatsTimer.UpdateSince(start)
}()
return errDeferredResponse
}