[cm][docs] Include resolvers in component_manifest doc
Change-Id: I726358ff43ce6dc290b9da3200b8280133cf7c3a
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/476257
Fuchsia-Auto-Submit: Adam Lesinski <adamlesinski@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Vardhan Mudunuru <vardhan@google.com>
diff --git a/docs/concepts/components/v2/component_manifests.md b/docs/concepts/components/v2/component_manifests.md
index d73d543..dc3a564 100644
--- a/docs/concepts/components/v2/component_manifests.md
+++ b/docs/concepts/components/v2/component_manifests.md
@@ -400,6 +400,17 @@
instance.
- `as` _(option)_: An explicit name for the runner as it will be known in
this environment. If omitted, defaults to `runner`.
+- `resolvers`: The resolvers registered in the environment. An array of objects
+ with the following properties:
+ - `resolver`: The [name](#capability-names) of a resolver capability, whose
+ source is specified in `from`.
+ - `from`: The source of the resolver capability, one of:
+ - `parent`: The component's parent.
+ - `self`: This component.
+ - `#<child-name>`: A [reference](#references) to a child component
+ instance.
+ - `scheme`: The URL scheme for which the resolver should handle resolution.
+
Example:
@@ -414,6 +425,13 @@
from: "#gtest",
},
],
+ resolvers: [
+ {
+ resolver: "universe-resolver",
+ from: "parent",
+ scheme: "fuchsia-pkg",
+ },
+ ],
},
],
```
@@ -430,6 +448,7 @@
- [`directory`](#capability-directory)
- [`storage`](#capability-storage)
- [`runner`](#capability-runner)
+- [`resolver`](#capability-resolver)
#### protocol {#capability-protocol}
@@ -473,9 +492,17 @@
- `runner`: The [name](#capability-names) for this runner capability.
- `path`: The path in the component's outgoing directory from which the
- `fuchsia.sys2.ComponentRunner` protocol is served.
+ `fuchsia.component.runner.ComponentRunner` protocol is served.
- `from`: Must be set, but ignored ([fxb/52195](https://fxbug.dev/52195)).
+#### resolver {#capability-resolver}
+
+A definition of a [resolver capability][doc-resolvers].
+
+- `resolver`: The [name](#capability-names) for this resolver capability.
+- `path`: The path in the component's outgoing directory from
+ which the `fuchsia.sys2.ComponentResolver` protocol is served.
+
### use {#use}
The `use` section declares the capabilities that the component can use at
@@ -533,6 +560,7 @@
an array of names to protocol capabilities.
- `directory`: The [name](#capability-names) of a directory capability.
- `runner`: The [name](#capability-names) of a runner capability.
+ - `resolver`: The [name](#capability-names) of a resolver capability.
- `from`: The source of the capability, one of:
- `self`: This component. Requires a corresponding
[`capability`](#capabilities) declaration.
@@ -569,6 +597,10 @@
from: "#web_runner",
as: "web",
},
+ {
+ resolver: "universe-resolver",
+ from: "#universe_resolver",
+ },
],
```
@@ -585,6 +617,7 @@
- `directory`: The [name](#capability-names) of a directory capability.
- `storage`: The [name](#capability-names) of a storage capability.
- `runner`: The [name](#capability-names) of a runner capability.
+ - `resolver`: The [name](#capability-names) of a resolver capability.
- `from`: The source of the capability, one of:
- `parent`: The component's parent. This source can be used for all
capability types.
@@ -651,6 +684,11 @@
from: "parent",
to: [ "#user-shell" ],
},
+ {
+ resolver: "universe-resolver",
+ from: "parent",
+ to: [ "#user-shell" ],
+ },
],
```