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):
|
||||
return "dagger.#FS"
|
||||
case plancontext.IsServiceValue(val):
|
||||
return "dagger.#Service"
|
||||
return "dagger.#Socket"
|
||||
}
|
||||
|
||||
if val.IsConcreteR() != nil {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
build: docker.#Build & {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
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 & {
|
||||
host: client.filesystem."/var/run/docker.sock".read.contents
|
||||
|
@ -1,5 +1,5 @@
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
image: alpine.#Build & {
|
||||
|
@ -1,6 +1,6 @@
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "//./pipe/docker_engine": read: {
|
||||
contents: dagger.#Service
|
||||
contents: dagger.#Socket
|
||||
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"
|
||||
contents: #TempDir
|
||||
} | {
|
||||
type: "service"
|
||||
contents: dagger.#Service
|
||||
type: "socket"
|
||||
contents: dagger.#Socket
|
||||
} | {
|
||||
type: "fs"
|
||||
contents: dagger.#FS
|
||||
|
@ -67,8 +67,8 @@ _#clientFilesystemRead: {
|
||||
exclude?: [...string]
|
||||
} | {
|
||||
// CUE type defines expected content:
|
||||
// #Service: unix socket or npipe
|
||||
contents: #Service
|
||||
// #Socket: unix socket or npipe
|
||||
contents: #Socket
|
||||
|
||||
// Type of service
|
||||
type: *"unix" | "npipe"
|
||||
|
@ -26,10 +26,10 @@ package dagger
|
||||
}
|
||||
|
||||
// A reference to a network service endpoint, for example:
|
||||
// - A TCP or UDP port
|
||||
// - A unix socket
|
||||
// - A TCP or UDP port
|
||||
// - An HTTPS endpoint
|
||||
#Service: {
|
||||
#Socket: {
|
||||
$dagger: service: _id: string
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
// Connect via local docker socket
|
||||
#RunSocket: {
|
||||
host: dagger.#Service
|
||||
host: dagger.#Socket
|
||||
|
||||
docker.#Run & {
|
||||
mounts: docker: {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: test: {
|
||||
_cli: alpine.#Build & {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: test: {
|
||||
run: cli.#Run & {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
// Expose network ports
|
||||
// FIXME: investigate feasibility
|
||||
ports: [name=string]: {
|
||||
frontend: dagger.#Service
|
||||
frontend: dagger.#Socket
|
||||
backend: {
|
||||
protocol: *"tcp" | "udp"
|
||||
address: string
|
||||
|
@ -170,7 +170,7 @@ func (t clientFilesystemReadTask) readService(pctx *plancontext.Context, v *comp
|
||||
case "npipe":
|
||||
npipe = path
|
||||
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)
|
||||
|
@ -175,7 +175,7 @@ func (t execTask) mount(pctx *plancontext.Context, dest string, mnt *compiler.Va
|
||||
return t.mountCache(pctx, dest, mnt)
|
||||
case "tmp":
|
||||
return t.mountTmp(pctx, dest, mnt)
|
||||
case "service":
|
||||
case "socket":
|
||||
return t.mountService(pctx, dest, mnt)
|
||||
case "fs":
|
||||
return t.mountFS(pctx, dest, mnt)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.soc": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.soc": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
image: core.#Pull & {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
image: core.#Pull & {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "//./pipe/docker_engine": read: contents: dagger.#Service
|
||||
client: filesystem: "//./pipe/docker_engine": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
image: core.#Pull & {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Service
|
||||
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
|
||||
|
||||
actions: {
|
||||
image: core.#Pull & {
|
||||
|
Reference in New Issue
Block a user