Add ability to signal container not just processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -61,6 +61,9 @@ func (s *server) updateContainer(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
e := containerd.NewEvent(containerd.UpdateContainerEventType)
|
||||
e.ID = id
|
||||
if state.Signal != 0 {
|
||||
e.Signal = syscall.Signal(state.Signal)
|
||||
}
|
||||
e.State = &runtime.State{
|
||||
Status: runtime.Status(string(state.Status)),
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ type Machine struct {
|
||||
|
||||
type ContainerState struct {
|
||||
Status Status `json:"status,omitempty"`
|
||||
Signal int `json:"signal,omitempty"`
|
||||
}
|
||||
|
||||
type Container struct {
|
||||
|
Reference in New Issue
Block a user