| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| /// The FIDL representation of the component ID Index. |
| /// |
| /// See (component ID index)[//docs/development/components/component_id_index.md] |
| /// for documentation on the schema. |
| library fuchsia.component.internal; |
| |
| using fuchsia.component; |
| using fuchsia.sys; |
| |
| /// 256 bits encoded in lower-cased base64 (64 chars). |
| alias InstanceId = string:64; |
| /// The path to the appmgr realm where the component runs. |
| alias AppmgrRealmPath = vector<fuchsia.component.name>:256; |
| |
| /// Top-level type describing the component ID index. |
| type ComponentIdIndex = table { |
| /// If `true`, `appmgr` requires components which use |
| /// `isolated-persistent-storage` to list their instance in the index. |
| /// Otherwise, they fail to run. Note that this flag is only used by appmgr, |
| /// and is ignored by component_manager. |
| 1: appmgr_restrict_isolated_persistent_storage bool; |
| |
| /// A list of component ID instance entries. |
| /// |
| /// Required, but may be empty. |
| 2: instances vector<InstanceIdEntry>:1024; |
| }; |
| |
| type InstanceIdEntry = table { |
| /// A 256-bit identifier encoded in base64 which is unique across all other |
| /// instance IDs in the index. |
| 1: instance_id InstanceId; |
| |
| /// An appmgr-based moniker identifying an appmgr component instance |
| /// associated with `instance_id`. Note that component manager ignores |
| /// this field; it is only consumed by appmgr. |
| 2: appmgr_moniker AppmgrMoniker; |
| |
| /// The absolute moniker identifying the component instance. Note that |
| /// appmgr ignores thie field; it is only consumed by component manager. |
| 3: moniker string:fuchsia.component.MAX_MONIKER_LENGTH; |
| }; |
| |
| type AppmgrMoniker = table { |
| /// The component's URL. |
| 1: url fuchsia.sys.component_url; |
| |
| /// The path to the appmgr realm where the component runs. |
| 2: realm_path AppmgrRealmPath; |
| |
| /// The component instance's previous realm paths. `appmgr` will consider |
| /// these realms in addition to `realm_path`. This feature is useful when |
| /// moving a component to a new `realm_path`, but still needing to retain the |
| /// previous realm paths. For example, this feature can be used when a |
| /// component ID index change and the realm path code change cannot be |
| /// submitted atomically. |
| /// |
| /// Optional. |
| 3: transitional_realm_paths vector<AppmgrRealmPath>:64; |
| }; |