PROTOCOLS
Resolver
Defined in fuchsia.component.resolution/resolver.fidl
An interface for resolving a URL to a component.
This interface is implemented by components that provide support for loading components with a particular URL scheme. For example, the Fuchsia package component resolver exposes a service with this interface to resolve component URLs using the "fuchsia-pkg://" scheme.
To use a resolver to resolve URLs within your realm, register it in your realm's manifest.
Note: The component manager is the only intended direct client of this interface.
Resolve
Resolves a component with the given absolute URL.
component_url
is the unescaped URL of the component to resolve.
If successful, returns information about the component that was resolved.
On failure, returns a ResolverError
error.
Request
Name | Type |
---|---|
component_url |
string:2083
|
Response
Name | Type |
---|---|
payload |
Resolver_Resolve_Result
|
ResolveWithContext
Resolves a component with the absolute or relative URL. If relative, the
component will be resolved relative to the supplied context
.
component_url
is the unescaped URL of the component to resolve, the
format of which can be either:
- a fully-qualified absolute component URL; or
- a subpackaged-component reference, prefixed by a URI relative
path to its containing subpackage (for example,
child_package#meta/some_component.cm
)
context
is the resolution_context
of a previously-resolved
Component
, providing the context for resoving a relative URL.
Request
Name | Type |
---|---|
component_url |
string:2083
|
context |
Context
|
Response
Name | Type |
---|---|
payload |
Resolver_ResolveWithContext_Result
|
STRUCTS
Context
Defined in fuchsia.component.resolution/component.fidl
A component resolution context, used when resolving component URLs relative
to another component. The context is stored in a byte array that persists a
value used by the target Resolver
to locate and resolve a component by
relative path (for example, by a subpackage name).
Field | Type | Description | Default |
---|---|---|---|
bytes |
vector<uint8>:8192
|
No default |
Resolver_ResolveWithContext_Response resource
Defined in fuchsia.component.resolution/resolver.fidl
Field | Type | Description | Default |
---|---|---|---|
component |
Component
|
No default |
Resolver_Resolve_Response resource
Defined in fuchsia.component.resolution/resolver.fidl
Field | Type | Description | Default |
---|---|---|---|
component |
Component
|
No default |
ENUMS
ResolverError strict
Type: uint32
Defined in fuchsia.component.resolution/resolver.fidl
The possible error conditions returned by ComponentResolver.
Name | Value | Description |
---|---|---|
INTERNAL |
1 |
An unexpected error occurred. |
IO |
2 |
A general IO error occurred. |
INVALID_ARGS |
3 |
The component URL was malformed. |
NOT_SUPPORTED |
4 |
The repository specified in the URL is unsupported. |
MANIFEST_NOT_FOUND |
5 |
The component manifest was not found. |
PACKAGE_NOT_FOUND |
6 |
The component's package was not found. |
NO_SPACE |
7 |
Insufficient space on device to store component's package. |
RESOURCE_UNAVAILABLE |
8 |
The component is temporarily unavailable. |
INVALID_MANIFEST |
9 |
The component manifest could not be parsed or it contained invalid configuration. |
CONFIG_VALUES_NOT_FOUND |
10 |
The component specifies configuration fields but the values were not found. |
ABI_REVISION_NOT_FOUND |
11 |
The ABI revision file could not be found. Added: 12
|
INVALID_ABI_REVISION |
12 |
The ABI revision value could not be parsed. Added: 12
|
TABLES
Component resource
Defined in fuchsia.component.resolution/component.fidl
A component is a unit of executable software.
This object provides the component's declaration, access to its package's
content, and relevant metadata as resolved fuchsia.component.resolution.Resolver
.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
url |
string:2083
|
The resolved URL of the component. This is the canonical URL obtained by the component resolver after following redirects and resolving relative paths. |
2 |
decl |
fuchsia.mem/Data
|
Binary representation of the component's declaration ( |
3 |
package |
Package
|
The package that contains the component. By convention, the component's package is mapped to "/pkg" in its namespace at runtime. This is null if the component is not represented as a package.
In that case, it is the runner's responsibility to load the component's
resource from the Most runners, including but not limited to the builtin ELF runner, require the package's directory connection to have OPEN_RIGHT_EXECUTABLE rights in order to run the resolved component. |
4 |
config_values |
fuchsia.mem/Data
|
Binary representation of the component's configuration values
( |
5 |
resolution_context |
Context
|
The context used to resolve The
|
6 |
abi_revision |
fuchsia.version/AbiRevision
|
The target ABI revision of the resolved component. Added: 10
|
Package resource
Defined in fuchsia.component.resolution/package.fidl
A package is a signed collection of immutable files.
This object provides access to a package's content and relevant metadata.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
url |
string:2083
|
The URL of the package itself. |
2 |
directory |
client_end:fuchsia.io/Directory
|
The package's content directory. |
UNIONS
Resolver_ResolveWithContext_Result strict resource
Defined in fuchsia.component.resolution/resolver.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Resolver_ResolveWithContext_Response
|
|
2 |
err |
ResolverError
|
Resolver_Resolve_Result strict resource
Defined in fuchsia.component.resolution/resolver.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Resolver_Resolve_Response
|
|
2 |
err |
ResolverError
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_COMPONENT_URL_LENGTH |
2083
|
uint32 |
Max length of component URL. |
MAX_RESOLUTION_CONTEXT_SIZE |
8192
|
uint32 |
The maximum number of bytes for a |