[−][src]Struct dapr::client::Client
Implementations
impl<T: DaprInterface> Client<T>
[src]
pub async fn connect(addr: String) -> Result<Self, Error>
[src]
pub async fn invoke_service<I, M>(
&mut self,
app_id: I,
method_name: M,
data: Option<Any>
) -> Result<InvokeServiceResponse, Error> where
I: Into<String>,
M: Into<String>,
[src]
&mut self,
app_id: I,
method_name: M,
data: Option<Any>
) -> Result<InvokeServiceResponse, Error> where
I: Into<String>,
M: Into<String>,
Invoke a method in a Dapr enabled app.
Arguments
app_id
- Id of the application running.method_name
- Name of the method to invoke.data
- Required. Bytes value or data required to invoke service.
pub async fn invoke_binding<S>(
&mut self,
name: S,
data: Vec<u8>
) -> Result<InvokeBindingResponse, Error> where
S: Into<String>,
[src]
&mut self,
name: S,
data: Vec<u8>
) -> Result<InvokeBindingResponse, Error> where
S: Into<String>,
Invoke an Dapr output binding.
Arguments
name
- The name of the output binding to invoke.data
- The data which will be sent to the output binding.
pub async fn publish_event<S>(
&mut self,
pubsub_name: S,
topic: S,
data_content_type: S,
data: Vec<u8>,
metadata: Option<HashMap<String, String>>
) -> Result<(), Error> where
S: Into<String>,
[src]
&mut self,
pubsub_name: S,
topic: S,
data_content_type: S,
data: Vec<u8>,
metadata: Option<HashMap<String, String>>
) -> Result<(), Error> where
S: Into<String>,
Publish a payload to multiple consumers who are listening on a topic.
Dapr guarantees at least once semantics for this endpoint.
Arguments
pubsub_name
- Name of the pubsub componenttopic
- Pubsub topic.data
- The data which will be published to topic.
pub async fn get_secret<S>(
&mut self,
store_name: S,
key: S
) -> Result<GetSecretResponse, Error> where
S: Into<String>,
[src]
&mut self,
store_name: S,
key: S
) -> Result<GetSecretResponse, Error> where
S: Into<String>,
Get the secret for a specific key.
Arguments
store_name
- The name of secret store.key
- The name of secret key.
pub async fn get_state<S>(
&mut self,
store_name: S,
key: S,
metadata: Option<HashMap<String, String>>
) -> Result<GetStateResponse, Error> where
S: Into<String>,
[src]
&mut self,
store_name: S,
key: S,
metadata: Option<HashMap<String, String>>
) -> Result<GetStateResponse, Error> where
S: Into<String>,
Get the state for a specific key.
Arguments
store_name
- The name of state store.key
- The key of the desired state.
pub async fn save_state<I, K>(
&mut self,
store_name: K,
states: I
) -> Result<(), Error> where
I: IntoIterator<Item = (K, Vec<u8>)>,
K: Into<String>,
[src]
&mut self,
store_name: K,
states: I
) -> Result<(), Error> where
I: IntoIterator<Item = (K, Vec<u8>)>,
K: Into<String>,
Save an array of state objects.
Arguments
store_name
- The name of state store.states
- The array of the state key values.
pub async fn delete_bulk_state<I, K>(
&mut self,
store_name: K,
states: I
) -> Result<(), Error> where
I: IntoIterator<Item = (K, Vec<u8>)>,
K: Into<String>,
[src]
&mut self,
store_name: K,
states: I
) -> Result<(), Error> where
I: IntoIterator<Item = (K, Vec<u8>)>,
K: Into<String>,
Delete an array of state objects.
Arguments
store_name
- The name of state store.states
- The array of the state key values.
pub async fn delete_state<S>(
&mut self,
store_name: S,
key: S,
metadata: Option<HashMap<String, String>>
) -> Result<(), Error> where
S: Into<String>,
[src]
&mut self,
store_name: S,
key: S,
metadata: Option<HashMap<String, String>>
) -> Result<(), Error> where
S: Into<String>,
Delete the state for a specific key.
Arguments
store_name
- The name of state store.key
- The key of the desired state.
pub async fn set_metadata<S>(&mut self, key: S, value: S) -> Result<(), Error> where
S: Into<String>,
[src]
S: Into<String>,
pub async fn get_metadata(&mut self) -> Result<GetMetadataResponse, Error>
[src]
Set sidecar Metadata
Auto Trait Implementations
impl<T> RefUnwindSafe for Client<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Client<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Client<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Client<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Client<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,