// UpdateContainerResources updates ContainerConfig of the container.
UpdateContainerResources updates ContainerConfig of the container.
// UpdateContainerResources updates ContainerConfig of the container .
func (p *PrivilegedRuntime) UpdateContainerResources(containerID string, resources *kubeapi.LinuxContainerResources) error {
	if containerID == "" {
		return fmt.Errorf("containerID cannot be empty")
	}
	request := &kubeapi.UpdateContainerResourcesRequest{
		ContainerId: containerID,
		Linux: &kubeapi.LinuxContainerResources{
			CpusetCpus:         resources.CpusetCpus,
			CpusetMems:         resources.CpusetMems,
			MemoryLimitInBytes: resources.MemoryLimitInBytes,
			OomScoreAdj:        resources.OomScoreAdj,
		},
	}
	logrus.Debugf("UpdateContainerResourcesRequest: %v", request)
	r, err := runtimeClient.UpdateContainerResources(context.Background(), request)
	if err != nil {
		return err
	}
	logrus.Debugf("UpdateContainerResourcesResponse: %v", r)
	return nil
}
func ( p * PrivilegedRuntime ) UpdateContainerResources ( containerID string , resources * kubeapi . LinuxContainerResources ) error { if containerID == " " { return fmt . Errorf ( " " ) } request := & kubeapi . UpdateContainerResourcesRequest { ContainerId : containerID , Linux : & kubeapi . LinuxContainerResources { CpusetCpus : resources . CpusetCpus , CpusetMems : resources . CpusetMems , MemoryLimitInBytes : resources . MemoryLimitInBytes , OomScoreAdj : resources . OomScoreAdj , } , } logrus . Debugf ( " " , request ) r , err := runtimeClient . UpdateContainerResources ( context . Background ( ) , request ) if err != nil { return err } logrus . Debugf ( " " , r ) return nil }
UpdateContainerResources updates ContainerConfig of the container.
UpdateContainerResources updates ContainerConfig of the container .