Add pod delete control

- Push shortcut reports when pods are created/deleted
- Buffer upto 2 reports instead of dropping them
This commit is contained in:
Tom Wilkie
2016-04-21 17:34:08 +01:00
parent 64450a4830
commit cb52acbc46
12 changed files with 232 additions and 39 deletions

View File

@@ -49,7 +49,7 @@ func (r *registry) unpauseContainer(containerID string, _ xfer.Request) xfer.Res
return xfer.ResponseError(r.client.UnpauseContainer(containerID))
}
func (r *registry) removeContainer(containerID string, _ xfer.Request) xfer.Response {
func (r *registry) removeContainer(containerID string, req xfer.Request) xfer.Response {
log.Infof("Removing container %s", containerID)
if err := r.client.RemoveContainer(docker_client.RemoveContainerOptions{
ID: containerID,
@@ -57,7 +57,7 @@ func (r *registry) removeContainer(containerID string, _ xfer.Request) xfer.Resp
return xfer.ResponseError(err)
}
return xfer.Response{
RemovedNode: containerID,
RemovedNode: req.NodeID,
}
}