func (ch *controlHandler) handle(req xfer.Request) xfer.Response { var res xfer.Response if err := ch.client.Call("control.Handle", req, &res); err != nil { return xfer.ResponseError(err) } return res }
func (r *registry) unpauseContainer(req xfer.Request) xfer.Response { log.Printf("Unpausing container %s", req.NodeID) _, containerID, ok := report.ParseContainerNodeID(req.NodeID) if !ok { return xfer.ResponseErrorf("Invalid ID: %s", req.NodeID) } return xfer.ResponseError(r.client.UnpauseContainer(containerID)) }
func (r *registry) stopContainer(req xfer.Request) xfer.Response { log.Printf("Stopping container %s", req.NodeID) _, containerID, ok := report.ParseContainerNodeID(req.NodeID) if !ok { return xfer.ResponseErrorf("Invalid ID: %s", req.NodeID) } return xfer.ResponseError(r.client.StopContainer(containerID, waitTime)) }