Пример #1
0
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))
}
Пример #2
0
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))
}