LinuxContainer: Support pause/resume (#217)

This allows pausing the (really VM) container and any processes running
inside.
This commit is contained in:
Danny Canter
2025-08-07 13:12:11 -04:00
committed by GitHub
parent 88aeffe4db
commit adf5bd1866
7 changed files with 278 additions and 0 deletions
@@ -14,6 +14,7 @@
// limitations under the License.
//===----------------------------------------------------------------------===//
import ContainerizationError
import Foundation
/// The runtime state of the virtual machine instance.
@@ -46,4 +47,17 @@ public protocol VirtualMachineInstance: Sendable {
func start() async throws
/// Stop the virtual machine.
func stop() async throws
/// Pause the virtual machine.
func pause() async throws
/// Resume the virtual machine.
func resume() async throws
}
extension VirtualMachineInstance {
func pause() async throws {
throw ContainerizationError(.unsupported, message: "pause")
}
func resume() async throws {
throw ContainerizationError(.unsupported, message: "resume")
}
}