Skip to content

Commit d2e7faf

Browse files
markkovaribrooksmtownsend
authored andcommitted
chore(examples): extend link target value to target:name:
Signed-off-by: Márk Kővári <kovarimarkofficial@gmail.com>
1 parent d33a797 commit d2e7faf

File tree

45 files changed

+229
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+229
-163
lines changed

examples/c/components/http-hello-world/local.wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ spec:
2929
# The source (this provider) is configured such that the HTTP server listens on 0.0.0.0:8000
3030
- type: link
3131
properties:
32-
target: http-component
3332
namespace: wasi
3433
package: http
3534
interfaces: [incoming-handler]
35+
target:
36+
name: http-component
3637
source:
3738
config:
3839
- name: default-http

examples/c/components/http-hello-world/wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ spec:
3434
# The source (this provider) is configured such that the HTTP server listens on 0.0.0.0:8000
3535
- type: link
3636
properties:
37-
target: http-component
3837
namespace: wasi
3938
package: http
4039
interfaces: [incoming-handler]
40+
target:
41+
name: http-component
4142
source:
4243
config:
4344
- name: default-http

examples/golang/components/http-client-tinygo/local.wadm.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ spec:
2727
# (i.e. making external web requests)
2828
- type: link
2929
properties:
30-
target: httpclient
3130
namespace: wasi
3231
package: http
3332
interfaces: [outgoing-handler]
33+
target:
34+
name: httpclient
3435

3536
# Add a capability provider that enables HTTP access
3637
- name: httpserver
@@ -55,10 +56,11 @@ spec:
5556
# the component to handle a request.
5657
- type: link
5758
properties:
58-
target: http-component
5959
namespace: wasi
6060
package: http
6161
interfaces: [incoming-handler]
62+
target:
63+
name: http-component
6264
source:
6365
config:
6466
- name: default-http

examples/golang/components/http-client-tinygo/wadm.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ spec:
2727
# (i.e. making external web requests)
2828
- type: link
2929
properties:
30-
target: httpclient
3130
namespace: wasi
3231
package: http
3332
interfaces: [outgoing-handler]
33+
target:
34+
name: httpclient
3435

3536
# Add a capability provider that enables HTTP access
3637
- name: httpserver
@@ -55,10 +56,11 @@ spec:
5556
# the component to handle a request.
5657
- type: link
5758
properties:
58-
target: http-component
5959
namespace: wasi
6060
package: http
6161
interfaces: [incoming-handler]
62+
target:
63+
name: http-component
6264
source:
6365
config:
6466
- name: default-http

examples/golang/components/http-echo-tinygo/tests/fixtures/wadm.template.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ spec:
2323
traits:
2424
- type: link
2525
properties:
26-
target: test-http-echo-tinygo
2726
namespace: wasi
2827
package: http
2928
interfaces: [incoming-handler]
29+
target:
30+
name: test-http-echo-tinygo
3031
source:
3132
config:
3233
- name: default-http

examples/golang/components/http-echo-tinygo/wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ spec:
4444
# on the local machine
4545
- type: link
4646
properties:
47-
target: http-echo-tinygo
4847
namespace: wasi
4948
package: http
5049
interfaces: [incoming-handler]
50+
target:
51+
name: http-echo-tinygo
5152
source:
5253
config:
5354
- name: default-http

examples/golang/components/http-hello-world/wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ spec:
3737
# the component to handle a request.
3838
- type: link
3939
properties:
40-
target: http-component
4140
namespace: wasi
4241
package: http
4342
interfaces: [incoming-handler]
43+
target:
44+
name: http-component
4445
source:
4546
config:
4647
- name: default-http

examples/golang/components/http-password-checker/wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ spec:
3737
# the component to handle a request.
3838
- type: link
3939
properties:
40-
target: http-component
4140
namespace: wasi
4241
package: http
4342
interfaces: [incoming-handler]
43+
target:
44+
name: http-component
4445
source:
4546
config:
4647
- name: default-http

examples/golang/components/sqldb-postgres-query/local.wadm.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ spec:
3333
package: postgres
3434
interfaces: [query]
3535
target:
36-
- name: sqldb-postgres
37-
config:
38-
- name: default-postgres
36+
name: sqldb-postgres
37+
config:
38+
- name: default-postgres
3939

4040
# Add a capability provider that interacts with the filesystem
4141
- name: sqldb-postgres

examples/golang/providers/custom-template/wadm.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ spec:
2828
# can make use of outgoing handler functionality (i.e. calling functions in the system-info interface)
2929
- type: link
3030
properties:
31-
target: custom-template
3231
namespace: wasmcloud
3332
package: example
3433
interfaces: [system-info]
34+
target:
35+
name: custom-template
3536

3637
- name: custom-template
3738
type: capability
@@ -50,7 +51,8 @@ spec:
5051
# wasmcloud:example/process-data interface on `test-component`.
5152
- type: link
5253
properties:
53-
target: test-component
5454
namespace: wasmcloud
5555
package: example
5656
interfaces: [process-data]
57+
target:
58+
name: test-component

examples/python/components/http-hello-world/wadm.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ spec:
3737
# the component to handle a request.
3838
- type: link
3939
properties:
40-
target: http-component
4140
namespace: wasi
4241
package: http
4342
interfaces: [incoming-handler]
43+
target:
44+
name: http-component
4445
source:
4546
config:
4647
- name: default-http

examples/rust/components/blobby/wadm.yaml

+7-6
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ spec:
3838
package: blobstore
3939
interfaces: [blobstore]
4040
target:
41-
- name: blobstore
42-
config:
43-
- name: root-directory
44-
properties:
45-
root: '/tmp/blobstore'
41+
name: blobstore
42+
config:
43+
- name: root-directory
44+
properties:
45+
root: '/tmp/blobstore'
4646

4747
# Capability Providers
4848
- name: http
@@ -59,10 +59,11 @@ spec:
5959
# the component to handle a request.
6060
- type: link
6161
properties:
62-
target: blobby
6362
namespace: wasi
6463
package: http
6564
interfaces: [incoming-handler]
65+
target:
66+
name: blobby
6667
source:
6768
config:
6869
- name: default-http

examples/rust/components/dog-fetcher/local.wadm.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: dog-fetcher
66
annotations:
77
version: v0.0.1
8-
description: 'HTTP hello world demo in Rust, showing use of the server and client providers'
8+
description: "HTTP hello world demo in Rust, showing use of the server and client providers"
99
spec:
1010
components:
1111
- name: http-component
@@ -19,13 +19,14 @@ spec:
1919
instances: 1
2020
# Establish a unidirectional link to the `httpclient` provider,
2121
# so the `http-component` (dog-fetching) component can make use of httpclient functionality
22-
# (i.e. making external web requests)
22+
# (i.e. making external web requests)
2323
- type: link
2424
properties:
25-
target: httpclient
2625
namespace: wasi
2726
package: http
2827
interfaces: [outgoing-handler]
28+
target:
29+
name: httpclient
2930

3031
# Add a capability provider that enables HTTP access
3132
- name: httpserver
@@ -50,10 +51,11 @@ spec:
5051
# the component to handle an incoming HTTP request.
5152
- type: link
5253
properties:
53-
target: http-component
5454
namespace: wasi
5555
package: http
5656
interfaces: [incoming-handler]
57+
target:
58+
name: http-component
5759
source:
5860
config:
5961
- name: default-http

examples/rust/components/dog-fetcher/wadm.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ spec:
2727
instances: 1
2828
# Establish a unidirectional link to the `httpclient` provider,
2929
# so the `http-component` (dog-fetching) component can make use of httpclient functionality
30-
# (i.e. making external web requests)
30+
# (i.e. making external web requests)
3131
- type: link
3232
properties:
33-
target: httpclient
3433
namespace: wasi
3534
package: http
3635
interfaces: [outgoing-handler]
36+
target:
37+
name: httpclient
3738

3839
# Add a capability provider that enables HTTP access
3940
- name: httpserver
@@ -58,10 +59,11 @@ spec:
5859
# the component to handle an incoming HTTP request.
5960
- type: link
6061
properties:
61-
target: http-component
6262
namespace: wasi
6363
package: http
6464
interfaces: [incoming-handler]
65+
target:
66+
name: http-component
6567
source:
6668
config:
6769
- name: default-http

examples/rust/components/echo-messaging-0-3-0/local.wadm.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ spec:
2020
instances: 1
2121
# Establish a unidirectional link to the messaging capability provider (powered by NATS),
2222
# so the `echo` component can make use of messaging interface functionality
23-
# (i.e. making interacting with the messaging system, in this case NATS)
23+
# (i.e. making interacting with the messaging system, in this case NATS)
2424
- type: link
2525
properties:
26-
target: nats
2726
namespace: wasmcloud
2827
package: messaging
2928
interfaces: [consumer]
29+
target:
30+
name: nats
3031

3132
# Add a capability provider that implements `wasmcloud:messaging` using NATS
3233
- name: nats
@@ -42,18 +43,19 @@ spec:
4243
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
4344
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
4445
traits:
45-
# Since the `nats` capability provider calls an component to handle messages
46+
# Since the `nats` capability provider calls an component to handle messages
4647
# coming over subscriptions, this provider needs a unidirectional link to the
4748
# component that wil be called.
48-
#
49+
#
4950
# Here we link the `nats` provider (the "source"), to the `echo` component (the "target"),
5051
# so that so the provider can deliver messages to the component (by invoking the wasmcloud:messaging/incoming-handler interface) .
5152
- type: link
5253
properties:
53-
target: echo
5454
namespace: wasmcloud
5555
package: messaging
5656
interfaces: [handler]
57+
target:
58+
name: echo
5759
source:
5860
config:
5961
- name: simple-subscription

examples/rust/components/echo-messaging-0-3-0/wadm.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ spec:
2727
instances: 1
2828
# Establish a unidirectional link to the messaging capability provider (powered by NATS),
2929
# so the `echo` component can make use of messaging interface functionality
30-
# (i.e. making interacting with the messaging system, in this case NATS)
30+
# (i.e. making interacting with the messaging system, in this case NATS)
3131
- type: link
3232
properties:
33-
target: nats
3433
namespace: wasmcloud
3534
package: messaging
3635
interfaces: [consumer]
36+
target:
37+
name: nats
3738

3839
# Add a capability provider that implements `wasmcloud:messaging` using NATS
3940
- name: nats
@@ -49,18 +50,19 @@ spec:
4950
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
5051
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
5152
traits:
52-
# Since the `nats` capability provider calls an component to handle messages
53+
# Since the `nats` capability provider calls an component to handle messages
5354
# coming over subscriptions, this provider needs a unidirectional link to the
5455
# component that wil be called.
55-
#
56+
#
5657
# Here we link the `nats` provider (the "source"), to the `echo` component (the "target"),
5758
# so that so the provider can deliver messages to the component (by invoking the wasmcloud:messaging/handler interface) .
5859
- type: link
5960
properties:
60-
target: echo
6161
namespace: wasmcloud
6262
package: messaging
6363
interfaces: [handler]
64+
target:
65+
name: echo
6466
source:
6567
config:
6668
- name: simple-subscription

examples/rust/components/echo-messaging/local.wadm.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ spec:
2020
instances: 1
2121
# Establish a unidirectional link to the messaging capability provider (powered by NATS),
2222
# so the `echo` component can make use of messaging interface functionality
23-
# (i.e. making interacting with the messaging system, in this case NATS)
23+
# (i.e. making interacting with the messaging system, in this case NATS)
2424
- type: link
2525
properties:
26-
target: nats
2726
namespace: wasmcloud
2827
package: messaging
2928
interfaces: [consumer]
29+
target:
30+
name: nats
3031

3132
# Add a capability provider that implements `wasmcloud:messaging` using NATS
3233
- name: nats
@@ -42,18 +43,19 @@ spec:
4243
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
4344
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
4445
traits:
45-
# Since the `nats` capability provider calls an component to handle messages
46+
# Since the `nats` capability provider calls an component to handle messages
4647
# coming over subscriptions, this provider needs a unidirectional link to the
4748
# component that wil be called.
48-
#
49+
#
4950
# Here we link the `nats` provider (the "source"), to the `echo` component (the "target"),
5051
# so that so the provider can deliver messages to the component (by invoking the wasmcloud:messaging/handler interface) .
5152
- type: link
5253
properties:
53-
target: echo
5454
namespace: wasmcloud
5555
package: messaging
5656
interfaces: [handler]
57+
target:
58+
name: echo
5759
source:
5860
config:
5961
- name: simple-subscription

0 commit comments

Comments
 (0)