Enum holochain::conductor::api::AdminRequest
source · pub enum AdminRequest {
Show 24 variants
AddAdminInterfaces(Vec<AdminInterfaceConfig, Global>),
RegisterDna(Box<RegisterDnaPayload, Global>),
GetDnaDefinition(Box<HoloHash<Dna>, Global>),
UpdateCoordinators(Box<UpdateCoordinatorsPayload, Global>),
InstallApp(Box<InstallAppPayload, Global>),
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, Global>,
},
DumpFullState {
cell_id: Box<CellId, Global>,
dht_ops_cursor: Option<u64>,
},
DumpNetworkMetrics {
dna_hash: Option<HoloHash<Dna>>,
},
DumpNetworkStats,
AddAgentInfo {
agent_infos: Vec<AgentInfoSigned, Global>,
},
AgentInfo {
cell_id: Option<CellId>,
},
GraftRecords {
cell_id: CellId,
validate: bool,
records: Vec<Record<SignedHashed<Action>>, Global>,
},
GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload, Global>),
DeleteCloneCell(Box<DisableCloneCellPayload, Global>),
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, Global>)
Set up and register one or more new admin interfaces as specified by a list of configurations.
Returns
RegisterDna(Box<RegisterDnaPayload, Global>)
Register a DNA for later app installation.
Stores the given DNA into the Holochain DNA database and returns the hash of it.
Returns
GetDnaDefinition(Box<HoloHash<Dna>, Global>)
UpdateCoordinators(Box<UpdateCoordinatorsPayload, Global>)
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
InstallApp(Box<InstallAppPayload, Global>)
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
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
ListDnas
GenerateAgentPubKey
ListCellIds
List the IDs of all live cells currently running in the conductor.
Returns
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
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
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
AttachAppInterface
Open up a new websocket for processing AppRequest
s.
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 AppRequest
s.
DumpState
Dump the state of the cell specified by argument cell_id
,
including its chain, as a string containing JSON.
Returns
DumpFullState
Fields
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
DumpNetworkMetrics
DumpNetworkStats
Dump raw json network statistics from the backend networking lib.
AddAgentInfo
Fields
agent_infos: Vec<AgentInfoSigned, Global>
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
AgentInfo
Request the AgentInfoSigned
stored in this conductor’s
peer store.
You can:
- Get all agent info by leaving
cell_id
toNone
. - 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
GraftRecords
Fields
“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
GrantZomeCallCapability(Box<GrantZomeCallCapabilityPayload, Global>)
DeleteCloneCell(Box<DisableCloneCellPayload, Global>)
StorageInfo
Info about storage used by apps
Trait Implementations§
source§impl Debug for AdminRequest
impl Debug for AdminRequest
source§impl<'de> Deserialize<'de> for AdminRequest
impl<'de> Deserialize<'de> for AdminRequest
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AdminRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<AdminRequest, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl Serialize for AdminRequest
impl Serialize for AdminRequest
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
source§impl TryFrom<&AdminRequest> for SerializedBytes
impl TryFrom<&AdminRequest> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: &AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<AdminRequest> for SerializedBytes
impl TryFrom<AdminRequest> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<SerializedBytes> for AdminRequest
impl TryFrom<SerializedBytes> for AdminRequest
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(sb: SerializedBytes) -> Result<AdminRequest, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<AdminRequest, SerializedBytesError>
Auto Trait Implementations§
impl RefUnwindSafe for AdminRequest
impl Send for AdminRequest
impl Sync for AdminRequest
impl Unpin for AdminRequest
impl UnwindSafe for AdminRequest
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.