5624732128
* Add a new lint rule to the Makefile Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Fix linter errors Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Allow replacing the default apt mirror Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
23 lines
401 B
Go
23 lines
401 B
Go
package supervisor
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/Sirupsen/logrus"
|
|
)
|
|
|
|
// OOMTask holds needed parameters to report a container OOM
|
|
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: StateOOM,
|
|
})
|
|
return nil
|
|
}
|