Add oom support to events
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
70a8c1ec3f
commit
500ca74f38
10 changed files with 201 additions and 256 deletions
|
@ -2,6 +2,7 @@ package runtime
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -46,7 +47,15 @@ type Container interface {
|
|||
// Name or path of the OCI compliant runtime used to execute the container
|
||||
Runtime() string
|
||||
// OOM signals the channel if the container received an OOM notification
|
||||
// OOM() (<-chan struct{}, error)
|
||||
OOM() (OOM, error)
|
||||
}
|
||||
|
||||
type OOM interface {
|
||||
io.Closer
|
||||
FD() int
|
||||
ContainerID() string
|
||||
Flush()
|
||||
Removed() bool
|
||||
}
|
||||
|
||||
type Stdio struct {
|
||||
|
@ -159,8 +168,8 @@ type container struct {
|
|||
bundle string
|
||||
runtime string
|
||||
processes map[string]*process
|
||||
stdio Stdio
|
||||
labels []string
|
||||
oomFds []int
|
||||
}
|
||||
|
||||
func (c *container) ID() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue