Rename dagger.#Service
to dagger.#Socket
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
parent
4058d56f1b
commit
6a2bbc62e0
@ -24,7 +24,7 @@ func FormatValue(val *compiler.Value) string {
|
|||||||
case plancontext.IsFSValue(val):
|
case plancontext.IsFSValue(val):
|
||||||
return "dagger.#FS"
|
return "dagger.#FS"
|
||||||
case plancontext.IsServiceValue(val):
|
case plancontext.IsServiceValue(val):
|
||||||
return "dagger.#Service"
|
return "dagger.#Socket"
|
||||||
}
|
}
|
||||||
|
|
||||||
if val.IsConcreteR() != nil {
|
if val.IsConcreteR() != nil {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
build: docker.#Build & {
|
build: docker.#Build & {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: run: cli.#Run & {
|
actions: run: cli.#Run & {
|
||||||
host: client.filesystem."/var/run/docker.sock".read.contents
|
host: client.filesystem."/var/run/docker.sock".read.contents
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
image: alpine.#Build & {
|
image: alpine.#Build & {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "//./pipe/docker_engine": read: {
|
client: filesystem: "//./pipe/docker_engine": read: {
|
||||||
contents: dagger.#Service
|
contents: dagger.#Socket
|
||||||
type: "npipe"
|
type: "npipe"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
pkg/dagger.io/dagger/compat.cue
Normal file
4
pkg/dagger.io/dagger/compat.cue
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package dagger
|
||||||
|
|
||||||
|
// DEPRECATED: Use #Socket instead
|
||||||
|
#Service: #Socket
|
@ -55,8 +55,8 @@ import "dagger.io/dagger"
|
|||||||
type: "tmp"
|
type: "tmp"
|
||||||
contents: #TempDir
|
contents: #TempDir
|
||||||
} | {
|
} | {
|
||||||
type: "service"
|
type: "socket"
|
||||||
contents: dagger.#Service
|
contents: dagger.#Socket
|
||||||
} | {
|
} | {
|
||||||
type: "fs"
|
type: "fs"
|
||||||
contents: dagger.#FS
|
contents: dagger.#FS
|
||||||
|
@ -67,8 +67,8 @@ _#clientFilesystemRead: {
|
|||||||
exclude?: [...string]
|
exclude?: [...string]
|
||||||
} | {
|
} | {
|
||||||
// CUE type defines expected content:
|
// CUE type defines expected content:
|
||||||
// #Service: unix socket or npipe
|
// #Socket: unix socket or npipe
|
||||||
contents: #Service
|
contents: #Socket
|
||||||
|
|
||||||
// Type of service
|
// Type of service
|
||||||
type: *"unix" | "npipe"
|
type: *"unix" | "npipe"
|
||||||
|
@ -26,10 +26,10 @@ package dagger
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A reference to a network service endpoint, for example:
|
// A reference to a network service endpoint, for example:
|
||||||
// - A TCP or UDP port
|
|
||||||
// - A unix socket
|
// - A unix socket
|
||||||
|
// - A TCP or UDP port
|
||||||
// - An HTTPS endpoint
|
// - An HTTPS endpoint
|
||||||
#Service: {
|
#Socket: {
|
||||||
$dagger: service: _id: string
|
$dagger: service: _id: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
|
|
||||||
// Connect via local docker socket
|
// Connect via local docker socket
|
||||||
#RunSocket: {
|
#RunSocket: {
|
||||||
host: dagger.#Service
|
host: dagger.#Socket
|
||||||
|
|
||||||
docker.#Run & {
|
docker.#Run & {
|
||||||
mounts: docker: {
|
mounts: docker: {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: test: {
|
actions: test: {
|
||||||
_cli: alpine.#Build & {
|
_cli: alpine.#Build & {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: test: {
|
actions: test: {
|
||||||
run: cli.#Run & {
|
run: cli.#Run & {
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
// Expose network ports
|
// Expose network ports
|
||||||
// FIXME: investigate feasibility
|
// FIXME: investigate feasibility
|
||||||
ports: [name=string]: {
|
ports: [name=string]: {
|
||||||
frontend: dagger.#Service
|
frontend: dagger.#Socket
|
||||||
backend: {
|
backend: {
|
||||||
protocol: *"tcp" | "udp"
|
protocol: *"tcp" | "udp"
|
||||||
address: string
|
address: string
|
||||||
|
@ -170,7 +170,7 @@ func (t clientFilesystemReadTask) readService(pctx *plancontext.Context, v *comp
|
|||||||
case "npipe":
|
case "npipe":
|
||||||
npipe = path
|
npipe = path
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid service type %q", typ)
|
return nil, fmt.Errorf("invalid socket type %q", typ)
|
||||||
}
|
}
|
||||||
|
|
||||||
service := pctx.Services.New(unix, npipe)
|
service := pctx.Services.New(unix, npipe)
|
||||||
|
@ -175,7 +175,7 @@ func (t execTask) mount(pctx *plancontext.Context, dest string, mnt *compiler.Va
|
|||||||
return t.mountCache(pctx, dest, mnt)
|
return t.mountCache(pctx, dest, mnt)
|
||||||
case "tmp":
|
case "tmp":
|
||||||
return t.mountTmp(pctx, dest, mnt)
|
return t.mountTmp(pctx, dest, mnt)
|
||||||
case "service":
|
case "socket":
|
||||||
return t.mountService(pctx, dest, mnt)
|
return t.mountService(pctx, dest, mnt)
|
||||||
case "fs":
|
case "fs":
|
||||||
return t.mountFS(pctx, dest, mnt)
|
return t.mountFS(pctx, dest, mnt)
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.soc": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.soc": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
image: core.#Pull & {
|
image: core.#Pull & {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
image: core.#Pull & {
|
image: core.#Pull & {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "//./pipe/docker_engine": read: contents: dagger.#Service
|
client: filesystem: "//./pipe/docker_engine": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
image: core.#Pull & {
|
image: core.#Pull & {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
image: core.#Pull & {
|
image: core.#Pull & {
|
||||||
|
Reference in New Issue
Block a user