// StopContainer stops a running container with a grace period
StopContainer stops a running container with a grace period
// StopContainer stops a running container with a grace period
func (p *PrivilegedRuntime) StopContainer(containerID string, timeout int64) error {
	if containerID == "" {
		return fmt.Errorf("containerID cannot be empty")
	}
	request := &kubeapi.StopContainerRequest{
		ContainerId: containerID,
		Timeout:     timeout,
	}
	logrus.Debugf("StopContainerRequest: %v", request)
	r, err := runtimeClient.StopContainer(context.Background(), request)
	if err != nil {
		return err
	}
	logrus.Debugf("StopContainerResponse: %v", r)
	return nil
}
func ( p * PrivilegedRuntime ) StopContainer ( containerID string , timeout int64 ) error { if containerID == " " { return fmt . Errorf ( " " ) } request := & kubeapi . StopContainerRequest { ContainerId : containerID , Timeout : timeout , } logrus . Debugf ( " " , request ) r , err := runtimeClient . StopContainer ( context . Background ( ) , request ) if err != nil { return err } logrus . Debugf ( " " , r ) return nil }
StopContainer stops a running container with a grace period
StopContainer stops a running container with a grace period