Implement journal replay
Add addprocess event for addtional processes Add more api process information
This commit is contained in:
parent
6ff2239019
commit
17d9c10e2d
10 changed files with 296 additions and 62 deletions
32
event.go
32
event.go
|
@ -3,16 +3,19 @@ package containerd
|
|||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/opencontainers/specs"
|
||||
)
|
||||
|
||||
type EventType string
|
||||
|
||||
const (
|
||||
ExitEventType EventType = "exit"
|
||||
StartContainerEventType EventType = "startContainer"
|
||||
ContainerStartErrorEventType EventType = "startContainerError"
|
||||
GetContainerEventType EventType = "getContainer"
|
||||
SignalEventType EventType = "signal"
|
||||
ExitEventType EventType = "exit"
|
||||
StartContainerEventType EventType = "startContainer"
|
||||
DeleteEventType EventType = "deleteContainerEvent"
|
||||
GetContainerEventType EventType = "getContainer"
|
||||
SignalEventType EventType = "signal"
|
||||
AddProcessEventType EventType = "addProcess"
|
||||
)
|
||||
|
||||
func NewEvent(t EventType) *Event {
|
||||
|
@ -24,13 +27,14 @@ func NewEvent(t EventType) *Event {
|
|||
}
|
||||
|
||||
type Event struct {
|
||||
Type EventType `json:"type"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
ID string `json:"id,omitempty"`
|
||||
BundlePath string `json:"bundlePath,omitempty"`
|
||||
Pid int `json:"pid,omitempty"`
|
||||
Status int `json:"status,omitempty"`
|
||||
Signal os.Signal `json:"signal,omitempty"`
|
||||
Containers []Container `json:"-"`
|
||||
Err chan error `json:"-"`
|
||||
Type EventType `json:"type"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
ID string `json:"id,omitempty"`
|
||||
BundlePath string `json:"bundlePath,omitempty"`
|
||||
Pid int `json:"pid,omitempty"`
|
||||
Status int `json:"status,omitempty"`
|
||||
Signal os.Signal `json:"signal,omitempty"`
|
||||
Process *specs.Process `json:"process,omitempty"`
|
||||
Containers []Container `json:"-"`
|
||||
Err chan error `json:"-"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue