github.com/georgethebeatle/containerd@v0.2.5/supervisor/oom.go (about) 1 package supervisor 2 3 import ( 4 "time" 5 6 "github.com/Sirupsen/logrus" 7 ) 8 9 // OOMTask holds needed parameters to report a container OOM 10 type OOMTask struct { 11 baseTask 12 ID string 13 } 14 15 func (s *Supervisor) oom(t *OOMTask) error { 16 logrus.WithField("id", t.ID).Debug("containerd: container oom") 17 s.notifySubscribers(Event{ 18 Timestamp: time.Now(), 19 ID: t.ID, 20 Type: StateOOM, 21 }) 22 return nil 23 }