pub struct NatsMessagingProvider { /* private fields */ }
Expand description
Nats implementation for wasmcloud:messaging
Implementations§
source§impl NatsMessagingProvider
impl NatsMessagingProvider
pub async fn run() -> Result<()>
sourcepub fn from_host_data(host_data: &HostData) -> NatsMessagingProvider
pub fn from_host_data(host_data: &HostData) -> NatsMessagingProvider
Build a NatsMessagingProvider
from HostData
Trait Implementations§
source§impl Clone for NatsMessagingProvider
impl Clone for NatsMessagingProvider
source§fn clone(&self) -> NatsMessagingProvider
fn clone(&self) -> NatsMessagingProvider
Returns a copy 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 Default for NatsMessagingProvider
impl Default for NatsMessagingProvider
source§fn default() -> NatsMessagingProvider
fn default() -> NatsMessagingProvider
Returns the “default value” for a type. Read more
source§impl Provider for NatsMessagingProvider
impl Provider for NatsMessagingProvider
Handle provider control commands
put_link
(new component link command), del_link
(remove link command), and shutdown
source§async fn receive_link_config_as_target(
&self,
link_config: LinkConfig<'_>,
) -> Result<()>
async fn receive_link_config_as_target( &self, link_config: LinkConfig<'_>, ) -> Result<()>
Provider should perform any operations needed for a new link, including setting up per-component resources, and checking authorization. If the link is allowed, return true, otherwise return false to deny the link.
source§async fn delete_link_as_target(&self, info: impl LinkDeleteInfo) -> Result<()>
async fn delete_link_as_target(&self, info: impl LinkDeleteInfo) -> Result<()>
Handle notification that a link is dropped: close the connection
source§async fn receive_link_config_as_source(
&self,
__arg1: LinkConfig<'_>,
) -> Result<()>
async fn receive_link_config_as_source( &self, __arg1: LinkConfig<'_>, ) -> Result<()>
Receive and handle a link that has been established on the lattice where this provider is the source. Read more
source§async fn delete_link_as_source(&self, info: impl LinkDeleteInfo) -> Result<()>
async fn delete_link_as_source(&self, info: impl LinkDeleteInfo) -> Result<()>
Notify the provider that the link is dropped where the provider is the source
source§fn init(
&self,
init_config: impl ProviderInitConfig,
) -> impl Future<Output = Result<(), E>> + Send
fn init( &self, init_config: impl ProviderInitConfig, ) -> impl Future<Output = Result<(), E>> + Send
Initialize the provider Read more
source§fn on_config_update(
&self,
update: impl ProviderConfigUpdate,
) -> impl Future<Output = Result<(), E>> + Send
fn on_config_update( &self, update: impl ProviderConfigUpdate, ) -> impl Future<Output = Result<(), E>> + Send
Process a configuration update for the provider Read more
source§fn health_request(
&self,
_arg: &HealthCheckRequest,
) -> impl Future<Output = Result<HealthCheckResponse, E>> + Send
fn health_request( &self, _arg: &HealthCheckRequest, ) -> impl Future<Output = Result<HealthCheckResponse, E>> + Send
Perform health check. Called at regular intervals by host
Default implementation always returns healthy
Auto Trait Implementations§
impl Freeze for NatsMessagingProvider
impl !RefUnwindSafe for NatsMessagingProvider
impl Send for NatsMessagingProvider
impl Sync for NatsMessagingProvider
impl Unpin for NatsMessagingProvider
impl !UnwindSafe for NatsMessagingProvider
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request