Google celebrates Hispanic Heritage Month. See how.

fuchsia.component.test

Added: 7

PROTOCOLS

Builder

Defined in fuchsia.component.test/realm_builder.fidl

Build

Assembles the realm being constructed and returns the URL for the root component in the realm, which may then be used to create a new component in any collection where fuchsia-test-component is properly set up. Once this is called, any Realm channels for the realm will no longer be usable. The runner argument must be provided if the AddLocalChild function has been used in this realm, as this runner channel will be used to inform the client when to start and stop running any local component implementations.

Errors:

  • INVALID_COMPONENT_DECL: A component declaration failed validaiton.
  • BUILD_ALREADY_CALLED: The Build function has been called multiple times on this channel.

Request

NameType
runner fuchsia.component.runner/ComponentRunner

Response

NameType
result Builder_Build_Result

Realm

Defined in fuchsia.component.test/realm_builder.fidl

AddChild

Adds a component to the realm.

Errors:

  • CHILD_ALREADY_EXISTS: this realm already contains a child with the given name.
  • INVALID_MANIFEST_EXTENSION: url ends with .cmx, and thus should be used with AddLegacyChild instead of AddChild.
  • DECL_NOT_FOUND: The test package does not contain the component declaration referenced by a relative URL.
  • DECL_READ_ERROR: Encountered an I/O error when attempting to read a component declaration referenced by a relative URL from the test package.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/child_name
url fuchsia.url/Url
options ChildOptions

Response

NameType
result Realm_AddChild_Result

AddChildFromDecl

Adds a component to this realm whose declaration is set to decl. When launched, the component will share the test package as its package directory, and may access any resources from it.

Errors:

  • CHILD_ALREADY_EXISTS: this realm already contains a child with the given name.
  • INVALID_COMPONENT_DECL: decl failed validation.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/child_name
decl fuchsia.component.decl/Component
options ChildOptions

Response

NameType
result Realm_AddChildFromDecl_Result

AddChildRealm

Adds a child realm which can be built with the client end of child_realm.

Errors:

  • CHILD_ALREADY_EXISTS: this realm already contains a child with the given name.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/name
options ChildOptions
child_realm server_end<Realm>

Response

NameType
result Realm_AddChildRealm_Result

AddLegacyChild

Adds a legacy component to the realm. When the component is launched, RealmBuilder will reach out to appmgr to assist with launching the component, and the component will be able to utilize all of the features of the legacy component framework. Note that only protocol capabilities may be routed to this component. Capabilities of any other type (such as a directory) are unsupported for legacy components launched by RealmBuilder, and this legacy component should instead use the CMX features to access things such as storage.

Errors:

  • CHILD_ALREADY_EXISTS: this realm already contains a child with the given name.
  • INVALID_MANIFEST_EXTENSION: url does not end with .cmx, and thus should be used with AddChild instead of AddLegacyChild.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/child_name
legacy_url fuchsia.url/Url
options ChildOptions

Response

NameType
result Realm_AddLegacyChild_Result

AddLocalChild

Adds a component to the realm whose implementation will be provided by the client. When this component should be started, the runner channel passed into Build will receive a start request for a component whose ProgramDecl contains the relative moniker from the root of the constructed realm for the child that is to be run under the program key LOCAL_COMPONENT_NAME.

Errors:

  • CHILD_ALREADY_EXISTS: this realm already contains a child with the given name.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/child_name
options ChildOptions

Response

NameType
result Realm_AddLocalChild_Result

AddRoute

Mutates component manifests in the realm such that every component in to will have a valid capability route for each item in capabilities provided by from.

Errors:

  • NO_SUCH_SOURCE: from references a non-existent child.
  • NO_SUCH_TARGET: to references a non-existent child.
  • CAPABILITIES_EMPTY: capabilities is empty.
  • TARGETS_EMPTY: to is empty.
  • SOURCE_AND_TARGET_MATCH: from is equal to one of the elements in to.
  • INVALID_COMPONENT_DECL: The requested route caused one of the involved manifests to fail validation.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
capabilities vector<Capability>
from fuchsia.component.decl/Ref
to vector<fuchsia.component.decl/Ref>

Response

NameType
result Realm_AddRoute_Result

GetComponentDecl

Returns the component decl for the given component. name must refer to a component that is one of the following:

  • A component with a local implementation
  • A legacy component
  • A component added with a relative URL
  • An automatically generated realm (ex: the root)

Errors:

  • NO_SUCH_CHILD: This realm does not contain a child with the given name.
  • CHILD_DECL_NOT_VISIBLE: The component decl cannot be fetched for the referenced child, because the child was added to the realm using an absolute (not-relative) and modern (not legacy) URL.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

NameType
name fuchsia.component/child_name

Response

NameType
result Realm_GetComponentDecl_Result

GetRealmDecl

Returns the component decl for this realm.

Errors:

  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.

Request

<EMPTY>

Response

NameType
result Realm_GetRealmDecl_Result

InitMutableConfigFromPackage

Load any packaged configuration for name before using values provided to the builder.

Allows calling SetConfigValue to override packaged configuration.

Added: 9
#### Request {:#Realm.InitMutableConfigFromPackage_Request transformation="converted"}
NameType
name fuchsia.component/name
#### Response {:#Realm.InitMutableConfigFromPackage_Response transformation="converted"}
NameType
result Realm_InitMutableConfigFromPackage_Result
### InitMutableConfigToEmpty {:#Realm.InitMutableConfigToEmpty transformation="converted"}

Use only values provided to the builder for name's configuration.

Allows calling SetConfigValue to provide configuration.

Added: 9
#### Request {:#Realm.InitMutableConfigToEmpty_Request transformation="converted"}
NameType
name fuchsia.component/name
#### Response {:#Realm.InitMutableConfigToEmpty_Response transformation="converted"}
NameType
result Realm_InitMutableConfigToEmpty_Result
### ReadOnlyDirectory {:#Realm.ReadOnlyDirectory transformation="converted"}

Offers a directory capability to a component in this realm. The directory will be read-only (i.e. have r* rights), and will have the contents described in directory_contents.

Errors:

  • NO_SUCH_TARGET: offer-to references a non-existent child.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.
#### Request {:#Realm.ReadOnlyDirectory_Request transformation="converted"}
NameType
name fuchsia.component/name
to vector<fuchsia.component.decl/Ref>
directory_contents DirectoryContents
#### Response {:#Realm.ReadOnlyDirectory_Response transformation="converted"}
NameType
result Realm_ReadOnlyDirectory_Result
### ReplaceComponentDecl {:#Realm.ReplaceComponentDecl transformation="converted"}

Replaces the component decl for the given component. name must refer to a component that is one of the following:

  • A component with a local implementation
  • A legacy component
  • A component added with a relative URL
  • An automatically generated realm (ex: the root)

Errors:

  • NO_SUCH_CHILD: This realm does not contain a child with the given name.
  • CHILD_ALREADY_EXISTS: The component whose decl is being replaced has had a child added to it through realm builder with the same name as an element in component_decl.children.
  • CHILD_DECL_NOT_VISIBLE: The component decl cannot be manipulated for the referenced child, because the child was added to the realm using an absolute (not relative) and modern (not legacy) URL.
  • INVALID_COMPONENT_DECL: component_decl failed validation.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.
#### Request {:#Realm.ReplaceComponentDecl_Request transformation="converted"}
NameType
name fuchsia.component/child_name
component_decl fuchsia.component.decl/Component
#### Response {:#Realm.ReplaceComponentDecl_Response transformation="converted"}
NameType
result Realm_ReplaceComponentDecl_Result
### ReplaceConfigValue {:#Realm.ReplaceConfigValue transformation="converted"} #### Request {:#Realm.ReplaceConfigValue_Request transformation="converted"}
NameType
name fuchsia.component/name
key fuchsia.component.decl/ConfigKey
value fuchsia.component.config/ValueSpec
#### Response {:#Realm.ReplaceConfigValue_Response transformation="converted"}
NameType
result Realm_ReplaceConfigValue_Result
### ReplaceRealmDecl {:#Realm.ReplaceRealmDecl transformation="converted"}

Replaces the component decl for this realm.

Errors:

  • INVALID_COMPONENT_DECL: component_decl failed validation.
  • BUILD_ALREADY_CALLED: The Builder.Build function has been called for this realm, and thus this Realm channel can no longer be used.
#### Request {:#Realm.ReplaceRealmDecl_Request transformation="converted"}
NameType
component_decl fuchsia.component.decl/Component
#### Response {:#Realm.ReplaceRealmDecl_Response transformation="converted"}
NameType
result Realm_ReplaceRealmDecl_Result
### SetConfigValue {:#Realm.SetConfigValue transformation="converted"}

Sets the configuration value for a field specified by key. The component specified must have a config schema with this field. The value must conform to all constraints as defined by the schema.

This method must be called after either InitMutableConfigFromPackage or InitMutableConfigToEmpty.

Errors:

  • NO_CONFIG_SCHEMA: component does not have a config schema
  • NO_SUCH_CONFIG_FIELD: key could not be found in component's config schema
  • CONFIG_VALUE_INVALID: value does not meet config schema constraints
Added: 9
#### Request {:#Realm.SetConfigValue_Request transformation="converted"}
NameType
name fuchsia.component/name
key fuchsia.component.decl/ConfigKey
value fuchsia.component.config/ValueSpec
#### Response {:#Realm.SetConfigValue_Response transformation="converted"}
NameType
result Realm_SetConfigValue_Result
## RealmBuilderFactory {:#RealmBuilderFactory transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=25)*

This protocol can be used to instruct the Realm Builder Server to begin creating a new realm.

### Create {:#RealmBuilderFactory.Create transformation="converted"}

Creates a new RealmBuilder. The client end of realm_server_end can be used to mutate the realm that is being constructed, by doing things such as adding new children to the realm or adding capability routes between them. The client end of builder_server_end is used to finalize the realm, after which point it can be launched in a collection.

#### Request {:#RealmBuilderFactory.Create_Request transformation="converted"}
NameType
pkg_dir_handle fuchsia.io/Directory
realm_server_end server_end<Realm>
builder_server_end server_end<Builder>
#### Response {:#RealmBuilderFactory.Create_Response transformation="converted"}
NameType
result RealmBuilderFactory_Create_Result
### CreateFromRelativeUrl {:#RealmBuilderFactory.CreateFromRelativeUrl transformation="converted"}

Identical to Create, but instead of the realm being empty by default it contains the contents of the manifest located at relative_url within pkg_dir_handle.

#### Request {:#RealmBuilderFactory.CreateFromRelativeUrl_Request transformation="converted"}
NameType
pkg_dir_handle fuchsia.io/Directory
relative_url fuchsia.url/Url
realm_server_end server_end<Realm>
builder_server_end server_end<Builder>
#### Response {:#RealmBuilderFactory.CreateFromRelativeUrl_Response transformation="converted"}
NameType
result RealmBuilderFactory_CreateFromRelativeUrl_Result
## **STRUCTS** ### Builder_Build_Response {:#Builder_Build_Response data-text="Builder_Build_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=152)*
FieldTypeDescriptionDefault
root_component_url string[4096] No default
### DirectoryContents [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {:#DirectoryContents data-text="DirectoryContents" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=316)*

The contents of a directory that should be provided by the realm builder server.

FieldTypeDescriptionDefault
entries vector<DirectoryEntry>[1024] No default
### DirectoryEntry [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {:#DirectoryEntry data-text="DirectoryEntry" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=321)*

An entry in a directory.

FieldTypeDescriptionDefault
file_path fuchsia.component/name

The path to the file. Valid examples include foo.txt and foo/bar.json.

No default
file_contents fuchsia.mem/Buffer

The contents of the file.

No default
### RealmBuilderFactory_CreateFromRelativeUrl_Response {:#RealmBuilderFactory_CreateFromRelativeUrl_Response data-text="RealmBuilderFactory_CreateFromRelativeUrl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=45)* <EMPTY> ### RealmBuilderFactory_Create_Response {:#RealmBuilderFactory_Create_Response data-text="RealmBuilderFactory_Create_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=35)* <EMPTY> ### Realm_AddChildFromDecl_Response {:#Realm_AddChildFromDecl_Response data-text="Realm_AddChildFromDecl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=404)* <EMPTY> ### Realm_AddChildRealm_Response {:#Realm_AddChildRealm_Response data-text="Realm_AddChildRealm_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=444)* <EMPTY> ### Realm_AddChild_Response {:#Realm_AddChild_Response data-text="Realm_AddChild_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=354)* <EMPTY> ### Realm_AddLegacyChild_Response {:#Realm_AddLegacyChild_Response data-text="Realm_AddLegacyChild_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=383)* <EMPTY> ### Realm_AddLocalChild_Response {:#Realm_AddLocalChild_Response data-text="Realm_AddLocalChild_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=424)* <EMPTY> ### Realm_AddRoute_Response {:#Realm_AddRoute_Response data-text="Realm_AddRoute_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=541)* <EMPTY> ### Realm_GetComponentDecl_Response {:#Realm_GetComponentDecl_Response data-text="Realm_GetComponentDecl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=465)*
FieldTypeDescriptionDefault
component_decl fuchsia.component.decl/Component No default
### Realm_GetRealmDecl_Response {:#Realm_GetRealmDecl_Response data-text="Realm_GetRealmDecl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=502)*
FieldTypeDescriptionDefault
component_decl fuchsia.component.decl/Component No default
### Realm_InitMutableConfigFromPackage_Response {:#Realm_InitMutableConfigFromPackage_Response data-text="Realm_InitMutableConfigFromPackage_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=569)* <EMPTY> ### Realm_InitMutableConfigToEmpty_Response {:#Realm_InitMutableConfigToEmpty_Response data-text="Realm_InitMutableConfigToEmpty_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=577)* <EMPTY> ### Realm_ReadOnlyDirectory_Response {:#Realm_ReadOnlyDirectory_Response data-text="Realm_ReadOnlyDirectory_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=560)* <EMPTY> ### Realm_ReplaceComponentDecl_Response {:#Realm_ReplaceComponentDecl_Response data-text="Realm_ReplaceComponentDecl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=495)* <EMPTY> ### Realm_ReplaceConfigValue_Response {:#Realm_ReplaceConfigValue_Response data-text="Realm_ReplaceConfigValue_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=584)* <EMPTY> ### Realm_ReplaceRealmDecl_Response {:#Realm_ReplaceRealmDecl_Response data-text="Realm_ReplaceRealmDecl_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=515)* <EMPTY> ### Realm_SetConfigValue_Response {:#Realm_SetConfigValue_Response data-text="Realm_SetConfigValue_Response" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=607)* <EMPTY> ## **ENUMS** ### RealmBuilderError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {:#RealmBuilderError data-text="RealmBuilderError" transformation="converted"} Type: uint32 *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=52)*

Errors that may be returned by the Realm and Builder protocols.

Will be renamed to RealmBuilderError once the other definition under this name earlier in this file is removed.

NameValueDescription
0

Child cannot be added to the realm, as there is already a child in the realm with that name.

1

A legacy component URL was given to AddChild, or a modern component url was given to AddLegacyChild.

2

A component declaration failed validation.

3

The referenced child does not exist.

4

The component declaration for the referenced child cannot be viewed nor manipulated by RealmBuilder, because the child was added to the realm using an URL that was neither a relative nor a legacy URL.

5

The source does not exist.

6

A target does not exist.

7

The capabilities field is empty.

8

The targets field is empty.

9

The from value is equal to one of the elements in to.

10

The test package does not contain the component declaration referenced by a relative URL.

11

Encountered an I/O error when attempting to read a component declaration referenced by a relative URL from the test package.

12

The Build function has been called multiple times on this channel.

13

A capability is invalid. This may occur if a required field is empty or if an unsupported type is received.

14

The handle the client provided for the child realm is not usable.

15

ReplaceComponentDecl was called on a legacy or local component with a program declaration that did not match the one from the old component declaration. This could render a legacy or local component non-functional, and is disallowed.

16

The URL provided to RealmBuilderFactory.CreateFromRelativeURL is not a relative URL.

17

The handle the client provided for the test's pkg directory is not usable.

18

The component does not have a config schema defined. Attempting to set a config value is not allowed.

19

The component's config schema does not have a field with that name.

20

A config value is invalid. This may mean a type mismatch or an issue with constraints like string/vector length.

21

A config value cannot be set because the realm has not chosen its override policy.

Added: 9
## **TABLES** ### ChildOptions {:#ChildOptions data-text="ChildOptions" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=296)*

Properties that may be set on a child when it is added to a realm.

OrdinalFieldTypeDescription
startup fuchsia.component.decl/StartupMode

For information on this type, see https://fuchsia.dev/go/components/declaration#StartupMode. Defaults to LAZY.

environment fuchsia.component/name

Specify a custom environment for the child to run under.

on_terminate fuchsia.component.decl/OnTerminate

For information on this type, see https://fuchsia.dev/go/components/declaration#OnTerminate. Defaults to NONE.

### Directory {:#Directory data-text="Directory" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=196)*

A directory capability.

OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability. This is not the path of the directory. Instead it is a name used for routing.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another component. This field is optional.

type fuchsia.component.decl/DependencyType

For information on this type, see https://fuchsia.dev/go/components/declaration#DependencyType. This field is optional and defaults to STRONG.

subdir string[1024]

The subdirectory of this directory to offer instead of the root. For example, if you set bar/baz as the subdir of foo, then bar/baz will be the root of the target's foo. This field is optional.

rights fuchsia.io/Rights

The maximum rights that can be set by a component using this directory. This field is required if it is being routed to a local component, otherwise, it is optional.

path string[1024]

The path in which to install the directory. The path should have a leading slash but no trailing slash, e.g. /config/data. This field is required.

### Event {:#Event data-text="Event" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=262)*

An event capability

OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another component. This field is optional.

filter fuchsia.data/Dictionary

A filter to apply on the event.

### EventStream {:#EventStream data-text="EventStream" transformation="converted"} *Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=276)*

An event_stream capability

Added: 9
OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another

path string[1024]

Sets the path in which the event_stream is installed.

filter fuchsia.data/Dictionary

A filter to apply on the event.

scope vector<fuchsia.component.decl/Ref>

A list of objects underneath this component to downscope the event to. Example: #my_child_component, #my_child_collection.

Protocol

Defined in fuchsia.component.test/realm_builder.fidl

A protocol capability

OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability. This is usually the name of the FIDL protocol, e.g. fuchsia.logger.LogSink. If path is not set, the protocol will be installed in a target component's namespace at /svc/{name}.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another component. This field is optional.

type fuchsia.component.decl/DependencyType

For information on this type, see https://fuchsia.dev/go/components/declaration#DependencyType. This field is optional and defaults to STRONG.

path string[1024]

Override the path in which the protocol is installed. Instead of /svc/{name}, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. /foo/fuchsia.logger.LogSink. This field is optional.

Service

Defined in fuchsia.component.test/realm_builder.fidl

A service capability

OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability. This is usually the name of the FIDL service, e.g. fuchsia.echo.EchoService. If path is not set, the service will be installed in a target component's namespace at /svc/{name}.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another component. This field is optional.

path string[1024]

Override the path in which the service is installed. Instead of /svc/{name}, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. /foo/fuchsia.echo.EchoService. This field is optional.

Storage

Defined in fuchsia.component.test/realm_builder.fidl

A storage capability

OrdinalFieldTypeDescription
name fuchsia.component/name

The name of the capability. This is not the path of the directory. Instead it is a name used for routing.

as fuchsia.component/name

A rename of the capability, which can be set when routing to another component. This field is optional.

path fuchsia.component/name

The path in which to install the directory. The path should have a leading slash but no trailing slash, e.g. /config/data. This field is required.

UNIONS

Builder_Build_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Builder_Build_Response
err RealmBuilderError

Capability flexible

Defined in fuchsia.component.test/realm_builder.fidl

A capability that can be routed around a realm using AddRoute.

Will be renamed to Capability once the other definition under this name earlier in this file is removed.

OrdinalVariantTypeDescription
protocol Protocol
directory Directory
storage Storage
service Service
event Event
event_stream EventStream
Added: 9

RealmBuilderFactory_CreateFromRelativeUrl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response RealmBuilderFactory_CreateFromRelativeUrl_Response
err RealmBuilderError

RealmBuilderFactory_Create_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response RealmBuilderFactory_Create_Response
err RealmBuilderError

Realm_AddChildFromDecl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddChildFromDecl_Response
err RealmBuilderError

Realm_AddChildRealm_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddChildRealm_Response
err RealmBuilderError

Realm_AddChild_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddChild_Response
err RealmBuilderError

Realm_AddLegacyChild_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddLegacyChild_Response
err RealmBuilderError

Realm_AddLocalChild_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddLocalChild_Response
err RealmBuilderError

Realm_AddRoute_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_AddRoute_Response
err RealmBuilderError

Realm_GetComponentDecl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_GetComponentDecl_Response
err RealmBuilderError

Realm_GetRealmDecl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_GetRealmDecl_Response
err RealmBuilderError

Realm_InitMutableConfigFromPackage_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_InitMutableConfigFromPackage_Response
err RealmBuilderError

Realm_InitMutableConfigToEmpty_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_InitMutableConfigToEmpty_Response
err RealmBuilderError

Realm_ReadOnlyDirectory_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_ReadOnlyDirectory_Response
err RealmBuilderError

Realm_ReplaceComponentDecl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_ReplaceComponentDecl_Response
err RealmBuilderError

Realm_ReplaceConfigValue_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_ReplaceConfigValue_Response
err RealmBuilderError

Realm_ReplaceRealmDecl_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_ReplaceRealmDecl_Response
err RealmBuilderError

Realm_SetConfigValue_Result strict

Defined in fuchsia.component.test/realm_builder.fidl

OrdinalVariantTypeDescription
response Realm_SetConfigValue_Response
err RealmBuilderError

CONSTANTS

NameValueTypeDescription
LOCAL_COMPONENT_NAME_KEY LOCAL_COMPONENT_NAME String
MAX_DIRECTORY_ENTRIES 1024 uint32

Maximum number of entries allowed in one call of Realm.ReadOnlyDirectory.