Expand description
A Conductor is a dynamically changing group of Cells.
A Conductor can be managed:
- externally, via an
AppInterfaceApi
- from within a
Cell
, viaCellConductorApi
In normal use cases, a single Holochain user runs a single Conductor in a single process. However, there’s no reason we can’t have multiple Conductors in a single process, simulating multiple users in a testing environment.
async fn async_main () {
use holochain_state::test_utils::test_db_dir;
use holochain::conductor::{Conductor, ConductorBuilder};
let env_dir = test_db_dir();
let conductor: Conductor = ConductorBuilder::new()
.test(env_dir.path(), &[])
.await
.unwrap();
// conductors are cloneable
let conductor2 = conductor.clone();
assert_eq!(conductor.list_dnas(), vec![]);
conductor.shutdown();
Modules§
- A sync RwLock that uses closures to avoid deadlocks.
Structs§
- The built-in implementation of the app store service, which runs a DNA
- A Conductor is a group of Cells
- A configurable Builder for Conductor and sometimes ConductorHandle
- Initialized for ConductorService: just the CellIds that are used for each service
- The set of all Conductor Services available to the conductor
- The built-in implementation of the DPKI service contract, which runs a DNA
- Interface for the AppStore service
- Interface for the DPKI service
- A clonable thread safe read write lock designed to make it hard to create dead locks or hold long long lived locks.
Enums§
- This doesn’t exist yet. We need to define it.
- The errors which can be produced by the AppStoreService
- CellStatusDeprecatedLegacy CellStatus which is no longer used. This can be removed and is only here to avoid breaking deserialization specs.
- The errors which can be produced by DPKI
- The reason why a cell is waiting to join the network.
Constants§
- How long we should attempt to achieve a “network join” when first activating a cell, before moving on and letting the network health activity go on in the background.
Traits§
- Interface for the AppStore service
- Interface for the DPKI service
- Some more helpful methods built around the methods provided by the service
Functions§
- Dump the full integration json state. Careful! This will return a lot of data.
- Dump the integration json state.
- Create a minimal usable mock of the app store
- Create a minimal usable mock of DPKI
Type Aliases§
- Alias
- A list of Cells which failed to start, and why
- Cloneable reference to a Conductor
- Alias