Move connecting socket to client: network
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,11 @@ package dagger
|
||||
}
|
||||
}
|
||||
|
||||
// Access client network endpoints
|
||||
network: [address=#Address]: _#clientNetwork & {
|
||||
"address": address
|
||||
}
|
||||
|
||||
// Access client environment variables
|
||||
env: _#clientEnv
|
||||
|
||||
@@ -65,13 +70,6 @@ _#clientFilesystemRead: {
|
||||
// Filename patterns to exclude
|
||||
// Example: ["node_modules"]
|
||||
exclude?: [...string]
|
||||
} | {
|
||||
// CUE type defines expected content:
|
||||
// #Socket: unix socket or npipe
|
||||
contents: #Socket
|
||||
|
||||
// Type of service
|
||||
type: *"unix" | "npipe"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +91,22 @@ _#clientFilesystemWrite: {
|
||||
}
|
||||
}
|
||||
|
||||
_#clientNetwork: {
|
||||
$dagger: task: _name: "ClientNetwork"
|
||||
|
||||
// URL to the socket
|
||||
// Example: unix:///var/run/docker.sock
|
||||
address: #Address
|
||||
|
||||
{
|
||||
// unix socket or npipe
|
||||
connect: #Socket
|
||||
// } | {
|
||||
// // FIXME: not yet implemented
|
||||
// listen: #Socket
|
||||
}
|
||||
}
|
||||
|
||||
_#clientEnv: {
|
||||
$dagger: task: _name: "ClientEnv"
|
||||
|
||||
|
@@ -34,4 +34,5 @@ package dagger
|
||||
}
|
||||
|
||||
// A network service address
|
||||
#Address: string & =~"^(tcp://|unix://|udp://).*"
|
||||
#Address: string & =~"^(unix://|npipe://).+"
|
||||
// TODO: #Address: string & =~"^(tcp://|unix://|npipe://|udp://).+"
|
||||
|
Reference in New Issue
Block a user