pub struct ServiceManagementClient { /* private fields */ }
Implementations§
Source§impl ServiceManagementClient
impl ServiceManagementClient
pub fn get_com(&self) -> IFabricServiceManagementClient6
Source§impl ServiceManagementClient
impl ServiceManagementClient
pub async fn resolve_service_partition( &self, name: &WString, key_type: &PartitionKeyType, prev: Option<&ResolvedServicePartition>, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<ResolvedServicePartition>
Sourcepub async fn restart_replica(
&self,
desc: &RestartReplicaDescription,
timeout: Duration,
cancellation_token: Option<BoxedCancelToken>,
) -> Result<()>
pub async fn restart_replica( &self, desc: &RestartReplicaDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
Simulates a service replica failure by restarting a persisted service replica, closing the replica, and then reopening it. Use this to test your service for problems along the replica reopen path. This helps simulate the report fault temporary path through client APIs. This is only valid for replicas that belong to stateful persisted services.
Sourcepub async fn remove_replica(
&self,
desc: &RemoveReplicaDescription,
timeout: Duration,
cancellation_token: Option<BoxedCancelToken>,
) -> Result<()>
pub async fn remove_replica( &self, desc: &RemoveReplicaDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
This API gives a running replica the chance to cleanup its state and be gracefully shutdown. WARNING: There are no safety checks performed when this API is used. Incorrect use of this API can lead to data loss for stateful services. Remarks: For stateless services, Instance Abort is called.
Sourcepub async fn register_service_notification_filter(
&self,
desc: &ServiceNotificationFilterDescription,
timeout: Duration,
cancellation_token: Option<BoxedCancelToken>,
) -> Result<FilterIdHandle>
pub async fn register_service_notification_filter( &self, desc: &ServiceNotificationFilterDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<FilterIdHandle>
Remarks: There is a cache of service endpoints in the client that gets updated by notifications and this same cache is used to satisfy complaint based resolution requests (see resolve_service_partition())). Applications that both register for notifications and use complaint based resolution on the same client instance typically only need to pass null for the ResolvedServicePartition argument during resolution. This will always return the endpoints in the client cache updated by the latest notification. The notification mechanism itself will keep the client cache updated when service endpoints change.
Notification callback is delivered on FabricClientBuilder::with_on_service_notification
as well.
The callback contains minimum info only as a signal, user can call resolve_service_partition()
again to retrieve full info from the cache.
This is observed to have 1~4 secs delay compared with brute force complaint based resolve.
Sourcepub async fn unregister_service_notification_filter(
&self,
filter_id_handle: FilterIdHandle,
timeout: Duration,
cancellation_token: Option<BoxedCancelToken>,
) -> Result<()>
pub async fn unregister_service_notification_filter( &self, filter_id_handle: FilterIdHandle, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
It’s not necessary to unregister individual filters if the client itself will no longer be used since all ServiceNotificationFilterDescription objects registered by the FabricClient will be automatically unregistered when client is disposed.
pub async fn create_service( &self, desc: &ServiceDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
pub async fn update_service( &self, name: &Uri, desc: &ServiceUpdateDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
pub async fn delete_service( &self, name: &Uri, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for ServiceManagementClient
impl Clone for ServiceManagementClient
Source§fn clone(&self) -> ServiceManagementClient
fn clone(&self) -> ServiceManagementClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more