pub struct LatticeControllerSender<T> where
T: Transport, { /* private fields */ }
Expand description
LatticeControllerSender sends messages to a LatticeController service Lattice Controller - Describes the interface used for actors to communicate with a lattice controller, enabling developers to deploy actors that can manipulate the lattice in which they’re running. client for sending LatticeController messages
Implementations
Constructs a LatticeControllerSender with the specified transport
Trait Implementations
pub fn auction_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ProviderAuctionRequest
) -> Pin<Box<dyn Future<Output = Result<Vec<ProviderAuctionAck, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn auction_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ProviderAuctionRequest
) -> Pin<Box<dyn Future<Output = Result<Vec<ProviderAuctionAck, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Seek out a list of suitable hosts for a capability provider given a set of host label constraints. Hosts on which this provider is already running will not be among the successful “bidders” in this auction.
pub fn auction_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ActorAuctionRequest
) -> Pin<Box<dyn Future<Output = Result<Vec<ActorAuctionAck, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn auction_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ActorAuctionRequest
) -> Pin<Box<dyn Future<Output = Result<Vec<ActorAuctionAck, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Seek out a list of suitable hosts for an actor given a set of host label constraints.
Queries the list of hosts currently visible to the lattice. This is a “gather” operation and so can be influenced by short timeouts, network partition events, etc.
pub fn get_host_inventory<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = Result<HostInventory, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
TS: ToString + Sync + 'async_trait + ?Sized,
LatticeControllerSender<T>: 'async_trait,
pub fn get_host_inventory<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = Result<HostInventory, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
TS: ToString + Sync + 'async_trait + ?Sized,
LatticeControllerSender<T>: 'async_trait,
Queries for the contents of a host given the supplied 56-character unique ID
pub fn get_claims<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<GetClaimsResponse, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn get_claims<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<GetClaimsResponse, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Queries the lattice for the list of known/cached claims by taking the response from the first host that answers the query.
pub fn scale_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ScaleActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn scale_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ScaleActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Instructs a given host to scale the indicated actor
pub fn start_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn start_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Instructs a given host to start the indicated actor
pub fn advertise_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 LinkDefinition
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn advertise_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 LinkDefinition
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Publish a link definition into the lattice, allowing it to be cached and delivered to the appropriate capability provider instances
pub fn remove_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 RemoveLinkDefinitionRequest
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn remove_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 RemoveLinkDefinitionRequest
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests the removal of a link definition. The definition will be removed from the cache and the relevant capability providers will be given a chance to de-provision any used resources
Queries all current link definitions in the lattice. The first host that receives this response will reply with the contents of the distributed cache
pub fn update_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 UpdateActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn update_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 UpdateActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests that a specific host perform a live update on the indicated actor
pub fn start_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartProviderCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn start_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartProviderCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests that the given host start the indicated capability provider
pub fn stop_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopProviderCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn stop_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopProviderCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests that the given capability provider be stopped on the indicated host
pub fn stop_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn stop_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopActorCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests that an actor be stopped on the given host
pub fn stop_host<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopHostCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
pub fn stop_host<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopHostCommand
) -> Pin<Box<dyn Future<Output = Result<CtlOperationAck, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Requests that the given host be stopped
returns the capability contract id for this interface