Add ability to signal container not just processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9eb08b8971
commit
b5931855a4
5 changed files with 24 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue