pub enum AdminRequest {
Show 23 variants AddAdminInterfaces(Vec<AdminInterfaceConfig>), RegisterDna(Box<RegisterDnaPayload>), GetDnaDefinition(Box<DnaHash>), UpdateCoordinators(Box<UpdateCoordinatorsPayload>), InstallApp(Box<InstallAppPayload>), UninstallApp { installed_app_id: InstalledAppId, }, ListDnas, GenerateAgentPubKey, ListCellIds, ListApps { status_filter: Option<AppStatusFilter>, }, EnableApp { installed_app_id: InstalledAppId, }, DisableApp { installed_app_id: InstalledAppId, }, StartApp { installed_app_id: InstalledAppId, }, AttachAppInterface { port: Option<u16>, }, ListAppInterfaces, DumpState { cell_id: Box<CellId>, }, DumpFullState { cell_id: Box<CellId>, dht_ops_cursor: Option<u64>, }, DumpNetworkMetrics { dna_hash: Option<DnaHash>, }, AddAgentInfo { agent_infos: Vec<AgentInfoSigned>, }, AgentInfo { cell_id: Option<CellId>, }, GraftRecords { cell_id: CellId, validate: bool, records: Vec<Record>, }, GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload>), DeleteCloneCell(Box<DeleteCloneCellPayload>),
}
Expand description

Represents the available conductor functions to call over an admin interface.

Enum variants follow a general convention of verb_noun as opposed to the noun_verb of responses.

Errors

Returns an AdminResponse::Error with a reason why the request failed.

Variants§

§

AddAdminInterfaces(Vec<AdminInterfaceConfig>)

Set up and register one or more new admin interfaces as specified by a list of configurations.

Returns

AdminResponse::AdminInterfacesAdded

§

RegisterDna(Box<RegisterDnaPayload>)

Register a DNA for later app installation.

Stores the given DNA into the Holochain DNA database and returns the hash of it.

Returns

AdminResponse::DnaRegistered

§

GetDnaDefinition(Box<DnaHash>)

Get the definition of a DNA.

Returns

AdminResponse::DnaDefinitionReturned

§

UpdateCoordinators(Box<UpdateCoordinatorsPayload>)

Update coordinator zomes for an already installed DNA.

Replaces any installed coordinator zomes with the same zome name. If the zome name doesn’t exist then the coordinator zome is appended to the current list of coordinator zomes.

Returns

AdminResponse::CoordinatorsUpdated

§

InstallApp(Box<InstallAppPayload>)

Install an app using an AppBundle.

Triggers genesis to be run on all Cells and to be stored. An app is intended for use by one and only one Agent and for that reason it takes an AgentPubKey and installs all the DNAs with that AgentPubKey, forming new cells. See InstallAppPayload for full details on the configuration.

Note that the new app will not be enabled automatically after installation and can be enabled by calling EnableApp.

Returns

AdminResponse::AppInstalled

§

UninstallApp

Fields

§installed_app_id: InstalledAppId

The app ID to uninstall

Uninstalls the app specified by argument installed_app_id from the conductor.

The app will be removed from the list of installed apps, and any cells which were referenced only by this app will be disabled and removed, clearing up any persisted data. Cells which are still referenced by other installed apps will not be removed.

Returns

AdminResponse::AppUninstalled

§

ListDnas

List the hashes of all installed DNAs.

Returns

AdminResponse::DnasListed

§

GenerateAgentPubKey

§

ListCellIds

List all the cell IDs in the conductor.

Returns

AdminResponse::CellIdsListed

§

ListApps

Fields

§status_filter: Option<AppStatusFilter>

An optional status to filter the list of apps by

List the apps and their information that are installed in the conductor.

If status_filter is Some(_), it will return only the apps with the specified status.

Returns

AdminResponse::AppsListed

§

EnableApp

Fields

§installed_app_id: InstalledAppId

The app ID to enable

Changes the specified app from a disabled to an enabled state in the conductor.

It is likely to want to call this after calling AdminRequest::InstallApp, since a freshly installed app is not enabled automatically. Once the app is enabled, zomes can be immediately called and it will also be loaded and enabled automatically on any reboot of the conductor.

Returns

AdminResponse::AppEnabled

§

DisableApp

Fields

§installed_app_id: InstalledAppId

The app ID to disable

Changes the specified app from an enabled to a disabled state in the conductor.

When an app is disabled, zome calls can no longer be made, and the app will not be loaded on a reboot of the conductor.

Returns

AdminResponse::AppDisabled

§

StartApp

Fields

§installed_app_id: InstalledAppId

The app ID to (re)start

§

AttachAppInterface

Fields

§port: Option<u16>

Optional port number

Open up a new websocket for processing AppRequests.

Any active app will be callable via the attached app interface.

Returns

AdminResponse::AppInterfaceAttached

Arguments

Optionally a port parameter can be passed to this request. If it is None, a free port is chosen by the conductor. The response will contain the port chosen by the conductor if None was passed.

§

ListAppInterfaces

List all the app interfaces currently attached with AttachAppInterface.

Returns

AdminResponse::AppInterfacesListed, a list of websocket ports that can process AppRequests.

§

DumpState

Fields

§cell_id: Box<CellId>

The cell ID for which to dump state

Dump the state of the cell specified by argument cell_id, including its chain, as a string containing JSON.

Returns

AdminResponse::StateDumped

§

DumpFullState

Fields

§cell_id: Box<CellId>

The cell ID for which to dump the state

§dht_ops_cursor: Option<u64>

The last seen DhtOp RowId, returned in the full dump state. Only DhtOps with RowId greater than the cursor will be returned.

Dump the full state of the Cell specified by argument cell_id, including its chain and DHT shard, as a string containing JSON.

Warning: this API call is subject to change, and will not be available to hApps. This is meant to be used by introspection tooling.

Note that the response to this call can be very big, as it’s requesting for the full database of the cell.

Also note that while DHT ops about private entries will be returned (like StoreRecord), the entry in itself will be missing, as it’s not actually stored publicly in the DHT shard.

Returns

AdminResponse::FullStateDumped

§

DumpNetworkMetrics

Fields

§dna_hash: Option<DnaHash>

If set, limits the metrics dumped to a single DNA hash space.

Dump the network metrics tracked by kitsune.

Returns

AdminResponse::NetworkMetricsDumped

§

AddAgentInfo

Fields

§agent_infos: Vec<AgentInfoSigned>

list of signed agent info to add to peer store

Add a list of agents to this conductor’s peer store.

This is a way of shortcutting peer discovery and is useful for testing.

It is also helpful if you know other agents on the network and they can send you their agent info.

Returns

AdminResponse::AgentInfoAdded

§

AgentInfo

Fields

§cell_id: Option<CellId>

Optionally choose the agent info of a specific cell.

Request the [AgentInfoSigned] stored in this conductor’s peer store.

You can:

  • Get all agent info by leaving cell_id to None.
  • Get a specific agent info by setting the cell_id.

This is how you can send your agent info to another agent. It is also useful for testing across networks.

Returns

AdminResponse::AgentInfo

§

GraftRecords

Fields

§cell_id: CellId

The cell that the records are being inserted into.

§validate: bool

If this is true, then the records will be validated before insertion. This is much slower but is useful for verifying the chain is valid.

If this is false, then records will be inserted as is. This could lead to an invalid chain.

§records: Vec<Record>

The records to be inserted into the source chain.

“Graft” [Record]s onto the source chain of the specified CellId.

The records must form a valid chain segment (ascending sequence numbers, and valid prev_action references). If the first record contains a prev_action which matches the existing records, then the new records will be “grafted” onto the existing chain at that point, and any other records following that point which do not match the new records will be removed.

If this operation is called when there are no forks, the final state will also have no forks.

BEWARE that this may result in the deletion of data! Any existing records which form a fork with respect to the new records will be deleted.

All records must be authored and signed by the same agent. The DnaFile (but not necessarily the cell) must already be installed on this conductor.

Care is needed when using this command as it can result in an invalid chain. Additionally, if conflicting source chain records are inserted on different nodes, then the chain will be forked.

If an invalid or forked chain is inserted and then pushed to the DHT, it can’t be undone.

Note that the cell does not need to exist to run this command. It is possible to insert records into a source chain before the cell is created. This can be used to restore from backup.

If the cell is installed, it is best to call AdminRequest::DisableApp before running this command, as otherwise the chain head may move. If truncate is true, the chain head is not checked and any new records will be lost.

Returns

AdminResponse::RecordsGrafted

§

GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload>)

Request capability grant for making zome calls.

Returns

AdminResponse::ZomeCallCapabilityGranted

§

DeleteCloneCell(Box<DeleteCloneCellPayload>)

Delete a clone cell that was previously disabled.

Returns

AdminResponse::CloneCellDeleted

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
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.
The type returned in the event of a conversion error.
Performs the conversion.

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
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 inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
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.
upcast ref
upcast mut ref
upcast boxed dyn
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