pub struct MockConductorHandleT { /* private fields */ }
Expand description

Base trait for ConductorHandle

Implementations

Validate that all current expectations for all methods have been satisfied, and discard them.

Create a new mock object with no expectations.

This method will not be generated if the real struct already has a new method. However, it will be generated if the struct implements a trait with a new method. The trait’s new method can still be called like <MockX as TraitY>::new

Create an Expectation for mocking the check_running method

Create an Expectation for mocking the initialize_conductor method

Create an Expectation for mocking the add_admin_interfaces method

Create an Expectation for mocking the add_app_interface method

Create an Expectation for mocking the list_app_interfaces method

Create an Expectation for mocking the register_dna method

Create an Expectation for mocking the hot_swap_coordinators method

Create an Expectation for mocking the list_dnas method

Create an Expectation for mocking the get_dna_def method

Create an Expectation for mocking the get_dna_file method

Create an Expectation for mocking the get_ribosome method

source

pub fn expect_get_entry_def(&mut self) -> &mut Expectation

Create an Expectation for mocking the get_entry_def method

Create an Expectation for mocking the load_dnas method

Create an Expectation for mocking the dispatch_holochain_p2p_event method

Create an Expectation for mocking the call_zome method

Create an Expectation for mocking the call_zome_with_workspace method

Create an Expectation for mocking the get_arbitrary_admin_websocket_port method

Create an Expectation for mocking the get_queue_consumer_workflows method

Create an Expectation for mocking the get_config method

Create an Expectation for mocking the take_shutdown_handle method

Create an Expectation for mocking the shutdown method

Create an Expectation for mocking the keystore method

Create an Expectation for mocking the holochain_p2p method

Create an Expectation for mocking the prune_p2p_agents_db method

Create an Expectation for mocking the create_clone_cell method

Create an Expectation for mocking the destroy_clone_cell method

Create an Expectation for mocking the install_app method

Create an Expectation for mocking the install_app_bundle method

Create an Expectation for mocking the uninstall_app method

Create an Expectation for mocking the reconcile_app_status_with_cell_status method

Create an Expectation for mocking the reconcile_cell_status_with_app_status method

Create an Expectation for mocking the enable_app method

Create an Expectation for mocking the disable_app method

Create an Expectation for mocking the start_app method

Create an Expectation for mocking the start_scheduler method

Create an Expectation for mocking the dispatch_scheduled_fns method

source

pub fn expect_post_commit_permit(&mut self) -> &mut Expectation

Create an Expectation for mocking the post_commit_permit method

Create an Expectation for mocking the pause_app method

Create an Expectation for mocking the list_cell_ids method

Create an Expectation for mocking the list_running_apps method

Create an Expectation for mocking the list_apps method

Create an Expectation for mocking the list_running_apps_for_required_cell_id method

Create an Expectation for mocking the list_running_apps_for_required_dna_hash method

Create an Expectation for mocking the dump_cell_state method

Create an Expectation for mocking the dump_full_cell_state method

Create an Expectation for mocking the dump_network_metrics method

Create an Expectation for mocking the signal_broadcaster method

Create an Expectation for mocking the get_app_info method

Create an Expectation for mocking the add_agent_infos method

Create an Expectation for mocking the get_agent_infos method

Create an Expectation for mocking the print_setup method

Create an Expectation for mocking the remove_cells method

Create an Expectation for mocking the insert_records_into_source_chain method

Create an Expectation for mocking the get_authored_db method

Create an Expectation for mocking the get_dht_db method

Create an Expectation for mocking the get_dht_db_cache method

Create an Expectation for mocking the get_cache_db method

Create an Expectation for mocking the get_p2p_db method

Create an Expectation for mocking the get_p2p_metrics_db method

Create an Expectation for mocking the get_spaces method

Create an Expectation for mocking the get_cell_triggers method

Create an Expectation for mocking the get_state_from_handle method

Create an Expectation for mocking the add_test_app_interface method

Create an Expectation for mocking the dev_settings method

Create an Expectation for mocking the update_dev_settings method

Create an Expectation for mocking the update_cell_status method

Create an Expectation for mocking the transition_app_status method

Trait Implementations

Base trait for ConductorHandle

Returns error if conductor is shutting down

Initialize the task manager, add admin interfaces from config, start up app interfaces from db, and register all tasks.

This requires a concrete ConductorHandle to be passed into the interface tasks. This is a bit weird to do, but it was the only way around having a circular reference in the types.

Never use a ConductorHandle for different Conductor here!

Add a collection of admin interfaces from config

Add an app interface

List the app interfaces currently install.

Install a DnaFile in this Conductor

Hot swap coordinator zomes on an existing dna.

Get the list of hashes of installed Dnas in this Conductor

Get a DnaDef from the RibosomeStore

Get a DnaFile from the RibosomeStore

Get an instance of a RealRibosome for the DnaHash

source

fn get_entry_def(&self, key: &EntryDefBufferKey) -> Option<EntryDef>

Get an EntryDef from the EntryDefBufferKey

Add the DnaFiles from the wasm and dna_def databases into memory

Dispatch a network event to the correct cell. Warning: returning an error from this function kills the network for the conductor.

Invoke a zome function on a Cell

Invoke a zome function on a Cell with a workspace

Get a Websocket port which will

Get the running queue consumer workflows per DnaHash map.

Get the conductor config

Return the JoinHandle for all managed tasks, which when resolved will signal that the Conductor has completely shut down.

NB: The JoinHandle is not cloneable, so this can only ever be called successfully once.

Send a signal to all managed tasks asking them to end ASAP.

Request access to this conductor’s keystore

Request access to this conductor’s networking handle

Prune expired agent_infos from the p2p agents database

Create a new Cell in an existing App based on an existing DNA

Destroy a cloned Cell

Install Cells into ConductorState based on installation info, and run genesis on all new source chains

Install DNAs and set up Cells as specified by an AppBundle

Uninstall an app from the state DB and remove all running Cells

Adjust app statuses (via state transitions) to match the current reality of which Cells are present in the conductor.

Adjust which cells are present in the Conductor (adding and removing as needed) to match the current reality of all app statuses.

  • If a Cell is used by at least one Running app, then ensure it is added
  • If a Cell is used by no running apps, then ensure it is removed.

Activate an app

Disable an app

Start an enabled but stopped (paused) app

Start the scheduler. All ephemeral tasks are deleted.

Dispatch all due scheduled functions.

Get an OwnedPermit to the post commit task.

Stop a running app while leaving it enabled. FOR TESTING ONLY.

List Cell Ids

List Active AppIds

List Apps with their information

Get the IDs of all active installed Apps which use this Cell

Get the IDs of all active installed Apps which use this Dna

Dump the cells state

Dump the full cells state

Dump the network metrics

Access the broadcast Sender which will send a Signal across every attached app interface

Get info about an installed App, whether active or inactive

Add signed agent info to the conductor

Get signed agent info from the conductor

Print the current setup in a machine readable way.

Manually remove some cells. Should only be used when handling errors in Cells, allowing individual Cells to be shut down.

Inject records into a source chain for a cell.

Retrieve the authored environment for this dna. FOR TESTING ONLY.

Retrieve the dht environment for this dna. FOR TESTING ONLY.

Retrieve the dht environment for this dna. FOR TESTING ONLY.

Retrieve the database for this cell. FOR TESTING ONLY.

Retrieve the database for networking. FOR TESTING ONLY.

Retrieve the database for metrics. FOR TESTING ONLY.

Retrieve the database for networking. FOR TESTING ONLY.

Retrieve Senders for triggering workflows. FOR TESTING ONLY.

Retrieve the ConductorState. FOR TESTING ONLY.

Add a “test” app interface for sending and receiving signals. FOR TESTING ONLY.

Get the current dev settings

Update the current dev settings

Manually coerce cells to a given CellStatus. FOR TESTING ONLY.

Manually coerce app to a given AppStatus. FOR TESTING ONLY.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more