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§

source§

impl<T: Transport> LatticeControllerSender<T>

source

pub fn via(transport: T) -> Self

Constructs a LatticeControllerSender with the specified transport

source

pub fn set_timeout(&self, interval: Duration)

Trait Implementations§

source§

impl<T: Clone + Transport> Clone for LatticeControllerSender<T>

source§

fn clone(&self) -> LatticeControllerSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Transport> Debug for LatticeControllerSender<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Transport + Sync + Send> LatticeController for LatticeControllerSender<T>

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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.

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Seek out a list of suitable hosts for an actor given a set of host label constraints.

source§

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, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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.

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Queries for the contents of a host given the supplied 56-character unique ID

source§

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, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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.

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Instructs a given host to scale the indicated actor

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Instructs a given host to start the indicated actor

Publish a link definition into the lattice, allowing it to be cached and delivered to the appropriate capability provider instances

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 specified lattice. The first host that receives this response will reply with the contents of the distributed cache

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Requests that a specific host perform a live update on the indicated actor

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Requests that the given host start the indicated capability provider

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Requests that the given capability provider be stopped on the indicated host

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Requests that an actor be stopped on the given host

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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.

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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

source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn contract_id() -> &'static str

returns the capability contract id for this interface

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more