pub enum ControllerCommand {
SetAdmins {
admins: Option<Vec<AccountOwner>>,
},
RemoveWorker {
worker_id: ChainId,
},
UpdateService {
service_id: ManagedServiceId,
workers: Vec<ChainId>,
},
RemoveService {
service_id: ManagedServiceId,
},
UpdateAllServices {
services: Vec<(ManagedServiceId, Vec<ChainId>)>,
},
UpdateChain {
chain_id: ChainId,
workers: Vec<ChainId>,
},
RemoveChain {
chain_id: ChainId,
},
UpdateAllChains {
chains: Vec<(ChainId, Vec<ChainId>)>,
},
}Expand description
A controller command
Variants§
SetAdmins
Set the admin owners.
Fields
§
admins: Option<Vec<AccountOwner>>RemoveWorker
Remove a worker. (This should not usually happen, but some workers may be broken and need to be cleaned up.)
UpdateService
Update the state of a particular service to be running on the specific workers.
RemoveService
Remove a service from the map entirely.
Fields
§
service_id: ManagedServiceIdUpdateAllServices
Set the states of all services at once, possibly removing some of them.
Fields
§
services: Vec<(ManagedServiceId, Vec<ChainId>)>UpdateChain
Update the state of a particular chain to be listened to on the specific workers.
RemoveChain
Remove a chain from the map entirely.
UpdateAllChains
Set the states of all chains at once, possibly removing some of them.
Trait Implementations§
Source§impl Clone for ControllerCommand
impl Clone for ControllerCommand
Source§fn clone(&self) -> ControllerCommand
fn clone(&self) -> ControllerCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControllerCommand
impl Debug for ControllerCommand
Source§impl<'de> Deserialize<'de> for ControllerCommand
impl<'de> Deserialize<'de> for ControllerCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl InputType for ControllerCommand
impl InputType for ControllerCommand
Source§type RawValueType = ControllerCommand
type RawValueType = ControllerCommand
The raw type used for validator. Read more
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value. None represents undefined.Source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl OutputType for ControllerCommand
impl OutputType for ControllerCommand
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§async fn resolve(
&self,
_: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, _: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl ScalarType for ControllerCommand
impl ScalarType for ControllerCommand
Auto Trait Implementations§
impl Freeze for ControllerCommand
impl RefUnwindSafe for ControllerCommand
impl Send for ControllerCommand
impl Sync for ControllerCommand
impl Unpin for ControllerCommand
impl UnsafeUnpin for ControllerCommand
impl UnwindSafe for ControllerCommand
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> FromBcsBytes for Twhere
T: DeserializeOwned,
impl<T> FromBcsBytes for Twhere
T: DeserializeOwned,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.