File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ extension Vminitd: SocketRelayAgent {
2828
2929 switch configuration. direction {
3030 case . into:
31- $0. guestPath = configuration. to . path
31+ $0. guestPath = configuration. destination . path
3232 $0. action = . into
3333 case . outOf:
34- $0. guestPath = configuration. from . path
34+ $0. guestPath = configuration. source . path
3535 $0. action = . outOf
3636 }
3737 }
Original file line number Diff line number Diff line change @@ -738,9 +738,9 @@ extension LinuxContainer {
738738 let rootInGuest = URL ( filePath: self . root)
739739
740740 if socket. direction == . into {
741- socket. to = rootInGuest. appending ( path: socket. to . path)
741+ socket. destination = rootInGuest. appending ( path: socket. destination . path)
742742 } else {
743- socket. from = rootInGuest. appending ( path: socket. from . path)
743+ socket. source = rootInGuest. appending ( path: socket. source . path)
744744 }
745745
746746 let port = self . hostVsockPorts. wrappingAdd ( 1 , ordering: . relaxed) . oldValue
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ public struct UnixSocketConfiguration: Sendable {
3131 /// direction this should be the path on the host to a unix socket.
3232 /// For direction .outOf this should be the path in the container/guest
3333 /// to a unix socket.
34- public var from : URL
34+ public var source : URL
3535
3636 /// The path you'd like the socket to be relayed to. For .into
37- /// direction this should be ther path in the container/guest. For
37+ /// direction this should be the path in the container/guest. For
3838 /// direction .outOf this should be the path on your host.
39- public var to : URL
39+ public var destination : URL
4040
4141 /// What to set the file permissions of the unix socket being created
4242 /// to. For .into direction this will be the socket in the guest. For
@@ -57,13 +57,13 @@ public struct UnixSocketConfiguration: Sendable {
5757 }
5858
5959 public init (
60- host : URL ,
60+ source : URL ,
6161 destination: URL ,
6262 permissions: FilePermissions ? = nil ,
6363 direction: Direction = . into
6464 ) {
65- self . from = host
66- self . to = destination
65+ self . source = source
66+ self . destination = destination
6767 self . permissions = permissions
6868 self . direction = direction
6969 }
Original file line number Diff line number Diff line change @@ -144,14 +144,14 @@ extension SocketRelay {
144144 case . outOf:
145145 // If we created the host conn, lets unlink it also. It's possible it was
146146 // already unlinked if the relay failed earlier.
147- try ? FileManager . default. removeItem ( at: self . configuration. to )
147+ try ? FileManager . default. removeItem ( at: self . configuration. destination )
148148 case . into:
149149 try self . vm. stopListen ( self . port)
150150 }
151151 }
152152
153153 private func setupHostVsockDial( ) async throws {
154- let hostConn = self . configuration. to
154+ let hostConn = self . configuration. destination
155155
156156 let socketType = try UnixType (
157157 path: hostConn. path,
@@ -181,7 +181,7 @@ extension SocketRelay {
181181 }
182182
183183 private func setupHostVsockListener( ) throws {
184- let hostPath = self . configuration. from
184+ let hostPath = self . configuration. source
185185 let port = self . port
186186 let log = self . log
187187
You can’t perform that action at this time.
0 commit comments