Network: Move to standalone type (#584)

The network protocol and VMNetNetwork implementation currently are
housed on ContainerManager even though they are generally useful types
even outside of this easy to use helper type. This change moves them to
not be nested types anymore, as well as exposes a new param on
VMNetNetworks constructor so we can pass the type of network.
This commit is contained in:
Danny Canter authored and GitHub committed 2026-03-19 11:33:46 -07:00
1 parent 420b915d8b
commit d8fcd1e9ca
8 files changed
+248 -197

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
{
"originHash" : "388030ec4369b8efc17c2c2d43edf28074bc35bba6354fef196e9830dc83c5c7",
"originHash" : "5de11e9b526f881c570e7b65cb339765f3aa79e8646a0c1289d36f224f9f8ca0",
"pins" : [
{
"identity" : "async-http-client",
@@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/containerization.git",
"state" : {
"revision" : "185bc1ecd7b6d9ef1938da1846e620ab73db8950",
"version" : "0.26.3"
"revision" : "636eef0eff00e451de6d5d426e6a6785b90b44e2",
"version" : "0.26.5"
}
},
{
@@ -35,7 +35,7 @@ struct CtrExample {
var manager = try await ContainerManager(
kernel: Kernel(path: URL(fileURLWithPath: kernelPath), platform: .linuxArm),
initfsReference: initfsReference,
network: try ContainerManager.VmnetNetwork()
network: try VmnetNetwork()
)
let containerId = "ctr-example"