oom.go 340 B

1234567891011121314151617181920212223
  1. package supervisor
  2. import (
  3. "time"
  4. "github.com/Sirupsen/logrus"
  5. )
  6. type OOMTask struct {
  7. baseTask
  8. ID string
  9. }
  10. func (s *Supervisor) oom(t *OOMTask) error {
  11. logrus.WithField("id", t.ID).Debug("containerd: container oom")
  12. s.notifySubscribers(Event{
  13. Timestamp: time.Now(),
  14. ID: t.ID,
  15. Type: StateOOM,
  16. })
  17. return nil
  18. }