pub enum AdminRequest {
Show 25 variants
AddAdminInterfaces(Vec<AdminInterfaceConfig, Global>),
RegisterDna(Box<RegisterDnaPayload, Global>),
CreateCloneCell(Box<CreateCloneCellPayload, Global>),
InstallApp(Box<InstallAppPayload, Global>),
InstallAppBundle(Box<InstallAppBundlePayload, Global>),
UninstallApp {
installed_app_id: String,
},
ListDnas,
GenerateAgentPubKey,
ListCellIds,
ListEnabledApps,
ListActiveApps,
ListApps {
status_filter: Option<AppStatusFilter>,
},
EnableApp {
installed_app_id: String,
},
ActivateApp {
installed_app_id: String,
},
DisableApp {
installed_app_id: String,
},
DeactivateApp {
installed_app_id: String,
},
StartApp {
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>>,
},
AddAgentInfo {
agent_infos: Vec<AgentInfoSigned, Global>,
},
RequestAgentInfo {
cell_id: Option<CellId>,
},
AddElements {
cell_id: CellId,
truncate: bool,
validate: bool,
elements: Vec<Element, Global>,
},
}
Expand description
Represents the available conductor functions to call over an Admin interface
and will result in a corresponding AdminResponse
message being sent back over the
interface connection.
Enum variants follow a general convention of verb_noun
as opposed to
the noun_verb
of AdminResponse
.
Expects a serialized object with any contents of the enum on a key data
and the enum variant on a key type
, e.g.
{ type: 'enable_app', data: { installed_app_id: 'test_app' } }
Variants
AddAdminInterfaces(Vec<AdminInterfaceConfig, Global>)
Set up and register one or more new Admin interfaces
as specified by a list of configurations. See AdminInterfaceConfig
for details on the configuration.
Will be responded to with an AdminResponse::AdminInterfacesAdded
or an AdminResponse::Error
RegisterDna(Box<RegisterDnaPayload, Global>)
Register a DNA for later use in InstallApp
Stores the given DNA into the holochain dnas database and returns the hash of the DNA
Will be responded to with an AdminResponse::DnaRegistered
or an AdminResponse::Error
CreateCloneCell(Box<CreateCloneCellPayload, Global>)
“Clone” a DNA (in the biological sense), thus creating a new Cell.
Using the provided, already-registered DNA, create a new DNA with a unique UID and the specified properties, create a new Cell from this cloned DNA, and add the Cell to the specified App.
Will be responded to with an AdminResponse::DnaCloned
or an AdminResponse::Error
InstallApp(Box<InstallAppPayload, Global>)
Install an app from a list of Dna
paths.
Triggers genesis to be run on all Cell
s 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 Cell
s.
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 AdminRequest::EnableApp
.
Will be responded to with an AdminResponse::AppInstalled
or an AdminResponse::Error
InstallAppBundle(Box<InstallAppBundlePayload, Global>)
Install an app using an AppBundle
.
Triggers genesis to be run on all Cell
s 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 Cell
s.
See InstallAppBundlePayload
for full details on the configuration.
Note that the new App
will not be enabled automatically after installation
and can be enabled by calling AdminRequest::EnableApp
.
Will be responded to with an AdminResponse::AppInstalled
or an AdminResponse::Error
UninstallApp
Fields
installed_app_id: String
The InstalledAppId to uninstall
Uninstalls the App
specified by argument installed_app_id
from the conductor,
meaning that 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.
Will be responded to with an AdminResponse::AppUninstalled
or an AdminResponse::Error
ListDnas
List the hashes of all installed Dna
s.
Takes no arguments.
Will be responded to with an AdminResponse::DnasListed
or an AdminResponse::Error
GenerateAgentPubKey
Generate a new AgentPubKey. Takes no arguments.
Will be responded to with an AdminResponse::AgentPubKeyGenerated
or an AdminResponse::Error
ListCellIds
List all the cell ids in the conductor. Takes no arguments.
Will be responded to with an AdminResponse::CellIdsListed
or an AdminResponse::Error
ListEnabledApps
List the ids of all the enabled Apps in the conductor. Takes no arguments.
Will be responded to with an AdminResponse::ActiveAppsListed
or an AdminResponse::Error
ListActiveApps
alias for ListEnabledApps
DEPRECATED. Alias for ListEnabledApps.
ListApps
Fields
status_filter: Option<AppStatusFilter>
List the ids of the Apps that are installed in the conductor, returning their information.
If status_filter
is Some(_)
, it will return only the Apps
with the specified status
Will be responded to with an AdminResponse::AppsListed
or an AdminResponse::Error
EnableApp
Fields
installed_app_id: String
The InstalledAppId to enable
Changes the App
specified by argument installed_app_id
from a disabled state to an enabled state in the conductor,
meaning that Zome calls can now be made and the App
will be loaded on a reboot of the conductor.
It is likely to want to call this after calling AdminRequest::InstallApp
, since a freshly
installed App
is not activated automatically.
Will be responded to with an AdminResponse::AppEnabled
or an AdminResponse::Error
ActivateApp
Fields
alias for EnableApp
DEPRECATED. Alias for EnableApp.
DisableApp
Fields
installed_app_id: String
The InstalledAppId to disable
Changes the App
specified by argument installed_app_id
from an enabled state to a disabled state in the conductor,
meaning that Zome calls can no longer be made, and the App
will not be loaded on a
reboot of the conductor.
Will be responded to with an AdminResponse::AppDisabled
or an AdminResponse::Error
DeactivateApp
Fields
alias for DisableApp
DEPRECATED. Alias for DisableApp.
StartApp
Fields
installed_app_id: String
The InstalledAppId to (re)start
AttachAppInterface
Open up a new websocket interface at the networking port
(optionally) specified by argument port
(or using any free port if argument port
is None
)
over which you can then use the [AppRequest
] API.
Any active App
will be callable via this interface.
The successful AdminResponse::AppInterfaceAttached
message will contain
the port chosen by the conductor if None
was passed.
Will be responded to with an AdminResponse::AppInterfaceAttached
or an AdminResponse::Error
ListAppInterfaces
List all the app interfaces currently attached with [AttachAppInterface
].
DumpState
Dump the state of the Cell
specified by argument cell_id
,
including its chain, as a string containing JSON.
Will be responded to with an AdminResponse::StateDumped
or an AdminResponse::Error
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 StoreElement
),
the entry in itself will be missing, as it’s not actually stored publicly in the DHT shard.
Will be responded to with an AdminResponse::FullStateDumped
or an AdminResponse::Error
DumpNetworkMetrics
Dump the network metrics tracked by kitsune.
AddAgentInfo
Fields
agent_infos: Vec<AgentInfoSigned, Global>
Vec of signed agent info to add to peer store
Add a list AgentInfoSigned to this conductor’s peer store. This is another way of finding peers on a dht.
This can be useful for testing.
It is also helpful if you know other agents on the network and they can send you their agent info.
RequestAgentInfo
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.
AddElements
Fields
cell_id: CellId
The cell that the elements are being inserted into.
truncate: bool
If this is true then all elements in the source chain will be removed before the new elements are inserted. WARNING this cannot be undone. Use with care!
If this is false then the elements will be appended to the end of the source chain.
validate: bool
If this is true then the elements will be validated before insertion. This is much slower but is useful for verify the chain is valid.
If this is false then elements will be inserted as is. This could lead to an invalid chain.
Insert Element
s into the source chain of the CellId
.
All elements 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 elements 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, then this can’t be undone.
Note that the cell does not need to exist to run this command. It is possible to insert elements 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
elements will be lost.
Trait Implementations
sourceimpl Debug for AdminRequest
impl Debug for AdminRequest
sourceimpl<'de> Deserialize<'de> for AdminRequest
impl<'de> Deserialize<'de> for AdminRequest
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for AdminRequest
impl Serialize for AdminRequest
sourcefn 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,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'_> TryFrom<&'_ AdminRequest> for SerializedBytes
impl<'_> TryFrom<&'_ AdminRequest> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: &AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<AdminRequest> for SerializedBytes
impl TryFrom<AdminRequest> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: AdminRequest) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for AdminRequest
impl TryFrom<SerializedBytes> for AdminRequest
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(sb: SerializedBytes) -> Result<AdminRequest, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<AdminRequest, SerializedBytesError>
Performs the conversion.
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> Any for T where
T: Any + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
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
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more