// StartContainer starts a hyper container
StartContainer starts a hyper container
// StartContainer starts a hyper container
func (c *Client) StartContainer(containerID string) error {
	isRunning, err := isContainerRunning(c, containerID)
	if err != nil {
		return err
	}
	if isRunning {
		glog.V(3).Infof("Container %q is already running, skip", containerID)
		return nil
	}
	ctx, cancel := getContextWithTimeout(hyperContextTimeout)
	defer cancel()
	_, err = c.client.ContainerStart(ctx, &types.ContainerStartRequest{ContainerId: containerID})
	if err != nil {
		return err
	}
	return nil
}
func ( c * Client ) StartContainer ( containerID string ) error { isRunning , err := isContainerRunning ( c , containerID ) if err != nil { return err } if isRunning { glog . V ( 3 ) . Infof ( " " , containerID ) return nil } ctx , cancel := getContextWithTimeout ( hyperContextTimeout ) defer cancel ( ) _ , err = c . client . ContainerStart ( ctx , & types . ContainerStartRequest { ContainerId : containerID } ) if err != nil { return err } return nil }
StartContainer starts a hyper container
StartContainer starts a hyper container