pub enum AdminRequest {
Show 24 variants AddAdminInterfaces(Vec<AdminInterfaceConfig>), RegisterDna(Box<RegisterDnaPayload>), GetDnaDefinition(Box<HoloHash<Dna>>), UpdateCoordinators(Box<UpdateCoordinatorsPayload>), InstallApp(Box<InstallAppPayload>), UninstallApp { installed_app_id: String, }, ListDnas, GenerateAgentPubKey, ListCellIds, ListApps { status_filter: Option<AppStatusFilter>, }, EnableApp { installed_app_id: String, }, DisableApp { installed_app_id: String, }, AttachAppInterface { port: Option<u16>, }, ListAppInterfaces, DumpState { cell_id: Box<CellId>, }, DumpFullState { cell_id: Box<CellId>, dht_ops_cursor: Option<u64>, }, DumpNetworkMetrics { dna_hash: Option<HoloHash<Dna>>, }, DumpNetworkStats, AddAgentInfo { agent_infos: Vec<AgentInfoSigned>, }, AgentInfo { cell_id: Option<CellId>, }, GraftRecords { cell_id: CellId, validate: bool, records: Vec<Record>, }, GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload>), DeleteCloneCell(Box<DisableCloneCellPayload>), StorageInfo,
}
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<HoloHash<Dna>>)

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

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

Fields

§installed_app_id: String

The app ID to uninstall

§

ListDnas

List the hashes of all installed DNAs.

§Returns

AdminResponse::DnasListed

§

GenerateAgentPubKey

§

ListCellIds

List the IDs of all live cells currently running in the conductor.

§Returns

AdminResponse::CellIdsListed

§

ListApps

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

Fields

§status_filter: Option<AppStatusFilter>

An optional status to filter the list of apps by

§

EnableApp

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

Fields

§installed_app_id: String

The app ID to enable

§

DisableApp

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

Fields

§installed_app_id: String

The app ID to disable

§

AttachAppInterface

Open up a new websocket for processing AppRequests. Any active app will be callable via the attached app interface.

NB: App interfaces are persisted when shutting down the conductor and are restored when restarting the conductor. Unused app interfaces are not cleaned up. It is therefore recommended to reuse existing interfaces. They can be queried with the call AdminRequest::ListAppInterfaces.

§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.

Fields

§port: Option<u16>

Optional port number

§

ListAppInterfaces

List all the app interfaces currently attached with AttachAppInterface.

§Returns

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

§

DumpState

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

§Returns

AdminResponse::StateDumped

Fields

§cell_id: Box<CellId>

The cell ID for which to dump state

§

DumpFullState

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

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.

§

DumpNetworkMetrics

Dump the network metrics tracked by kitsune.

§Returns

AdminResponse::NetworkMetricsDumped

Fields

§dna_hash: Option<HoloHash<Dna>>

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

§

DumpNetworkStats

Dump raw json network statistics from the backend networking lib.

§

AddAgentInfo

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

Fields

§agent_infos: Vec<AgentInfoSigned>

list of signed agent info to add to peer store

§

AgentInfo

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

Fields

§cell_id: Option<CellId>

Optionally choose the agent info of a specific cell.

§

GraftRecords

“Graft” Records 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

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.

§

GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload>)

Request capability grant for making zome calls.

§Returns

AdminResponse::ZomeCallCapabilityGranted

§

DeleteCloneCell(Box<DisableCloneCellPayload>)

Delete a clone cell that was previously disabled.

§Returns

AdminResponse::CloneCellDeleted

§

StorageInfo

Info about storage used by apps

Trait Implementations§

source§

impl Debug for AdminRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for AdminRequest

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<AdminRequest, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for AdminRequest

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&AdminRequest> for SerializedBytes

§

type Error = SerializedBytesError

The type returned in the event of a conversion error.
source§

fn try_from(t: &AdminRequest) -> Result<SerializedBytes, SerializedBytesError>

Performs the conversion.
source§

impl TryFrom<AdminRequest> for SerializedBytes

§

type Error = SerializedBytesError

The type returned in the event of a conversion error.
source§

fn try_from(t: AdminRequest) -> Result<SerializedBytes, SerializedBytesError>

Performs the conversion.
source§

impl TryFrom<SerializedBytes> for AdminRequest

§

type Error = SerializedBytesError

The type returned in the event of a conversion error.
source§

fn try_from(sb: SerializedBytes) -> Result<AdminRequest, SerializedBytesError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Any for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

source§

fn type_name(&self) -> &'static str

source§

impl<T> AnySync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

source§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

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

fn with_current_context(self) -> WithContext<Self>

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

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> LayoutRaw for T

source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

source§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
source§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
source§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,