containerd/supervisor/oom.go
Michael Crosby 500ca74f38 Add oom support to events
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-29 17:01:40 -08:00

22 lines
337 B
Go

package supervisor
import (
"time"
"github.com/Sirupsen/logrus"
)
type OOMTask struct {
baseTask
ID string
}
func (s *Supervisor) oom(t *OOMTask) error {
logrus.WithField("id", t.ID).Debug("containerd: container oom")
s.notifySubscribers(Event{
Timestamp: time.Now(),
ID: t.ID,
Type: "oom",
})
return nil
}