pub struct LatticeControllerSender<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: Transport> LatticeControllerSender<T>
impl<T: Transport> LatticeControllerSender<T>
sourcepub fn via(transport: T) -> Self
pub fn via(transport: T) -> Self
Constructs a LatticeControllerSender with the specified transport
pub fn set_timeout(&self, interval: Duration)
Trait Implementations
sourceimpl<T: Debug + Transport> Debug for LatticeControllerSender<T>
impl<T: Debug + Transport> Debug for LatticeControllerSender<T>
sourceimpl<T: Transport + Sync + Send> LatticeController for LatticeControllerSender<T>
impl<T: Transport + Sync + Send> LatticeController for LatticeControllerSender<T>
sourcefn auction_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ProviderAuctionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<ProviderAuctionAcks>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn auction_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ProviderAuctionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<ProviderAuctionAcks>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<ActorAuctionAcks>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn auction_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ActorAuctionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<ActorAuctionAcks>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Seek out a list of suitable hosts for an actor given a set of host label constraints.
sourcefn get_hosts<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<Hosts>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_hosts<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<Hosts>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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. The sole input to this query is the lattice ID on which the request takes place.
sourcefn get_host_inventory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 GetHostInventoryRequest
) -> Pin<Box<dyn Future<Output = RpcResult<HostInventory>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_host_inventory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 GetHostInventoryRequest
) -> Pin<Box<dyn Future<Output = RpcResult<HostInventory>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Queries for the contents of a host given the supplied 56-character unique ID
sourcefn get_claims<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<GetClaimsResponse>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_claims<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<GetClaimsResponse>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Queries the lattice for the list of known/cached claims by taking the response from the first host that answers the query. The sole input to this request is the lattice ID on which the request takes place.
sourcefn scale_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ScaleActorCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn scale_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 ScaleActorCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn start_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartActorCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 AdvertiseLinkRequest
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn advertise_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 AdvertiseLinkRequest
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn remove_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 RemoveLinkDefinitionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<LinkDefinitionList>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_links<'life0, 'life1, 'life2, 'async_trait, TS>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 TS
) -> Pin<Box<dyn Future<Output = RpcResult<LinkDefinitionList>> + Send + 'async_trait>> where
TS: 'async_trait + ToString + ?Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Queries all current link definitions in the specified 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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn update_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 UpdateActorCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn start_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StartProviderCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn stop_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopProviderCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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 = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn stop_actor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopActorCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Requests that an actor be stopped on the given host
sourcefn set_lattice_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetLatticeCredentialsRequest
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn set_lattice_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetLatticeCredentialsRequest
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Instructs the provider to store the NATS credentials/URL for a given lattice. This is designed to allow a single capability provider (or multiple instances of the same) to manage multiple lattices, reducing overhead and making it easier to support secure multi-tenancy of lattices.
sourcefn set_registry_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetRegistryCredentialsRequest
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn set_registry_credentials<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 SetRegistryCredentialsRequest
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
fn stop_host<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 StopHostCommand
) -> Pin<Box<dyn Future<Output = RpcResult<CtlOperationAck>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
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