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
sourceimpl<T> LatticeControllerSender<T> where
T: Transport,
impl<T> LatticeControllerSender<T> where
T: Transport,
sourcepub fn via(transport: T) -> LatticeControllerSender<T>
pub fn via(transport: T) -> LatticeControllerSender<T>
Constructs a LatticeControllerSender with the specified transport
pub fn set_timeout(&self, interval: Duration)
Trait Implementations
sourceimpl<T> Debug for LatticeControllerSender<T> where
T: Debug + Transport,
impl<T> Debug for LatticeControllerSender<T> where
T: Debug + Transport,
sourceimpl<T> LatticeController for LatticeControllerSender<T> where
T: Transport + Sync + Send,
impl<T> LatticeController for LatticeControllerSender<T> where
T: Transport + Sync + Send,
sourcefn 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,
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.
sourcefn 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,
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.
sourcefn get_hosts<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<Vec<Host, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
fn get_hosts<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<Vec<Host, Global>, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
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.
sourcefn 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: 'async_trait + ToString + Sync + ?Sized,
LatticeControllerSender<T>: 'async_trait,
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: 'async_trait + ToString + Sync + ?Sized,
LatticeControllerSender<T>: 'async_trait,
Queries for the contents of a host given the supplied 56-character unique ID
sourcefn 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,
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.
sourcefn 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,
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
sourcefn 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,
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
sourcefn 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,
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
sourcefn 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,
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
sourcefn get_links<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<LinkDefinitionList, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
fn get_links<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context
) -> Pin<Box<dyn Future<Output = Result<LinkDefinitionList, RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Queries all current link definitions in the lattice. The first host that receives this response will reply with the contents of the distributed cache
sourcefn 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,
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
sourcefn 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,
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
sourcefn 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,
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
sourcefn 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,
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
sourcefn 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,
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
sourcefn set_registry_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 HashMap<String, RegistryCredential, RandomState>
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
fn set_registry_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 HashMap<String, RegistryCredential, RandomState>
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LatticeControllerSender<T>: 'async_trait,
Instructs all listening hosts to use the enclosed credential map for authentication to secure artifact (OCI/bindle) registries. Any host that receives this message will delete its previous credential map and replace it with the enclosed. The credential map for a lattice can be purged by sending this message with an empty map
sourcefn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface
Auto Trait Implementations
impl<T> RefUnwindSafe for LatticeControllerSender<T> where
T: RefUnwindSafe,
impl<T> Send for LatticeControllerSender<T>
impl<T> Sync for LatticeControllerSender<T> where
T: Sync,
impl<T> Unpin for LatticeControllerSender<T> where
T: Unpin,
impl<T> UnwindSafe for LatticeControllerSender<T> where
T: UnwindSafe,
Blanket Implementations
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
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<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