ServiceManagementClient

Struct ServiceManagementClient 

Source
pub struct ServiceManagementClient { /* private fields */ }

Implementations§

Source§

impl ServiceManagementClient

Source§

impl ServiceManagementClient

Source

pub async fn resolve_service_partition( &self, name: &WString, key_type: &PartitionKeyType, prev: Option<&ResolvedServicePartition>, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<ResolvedServicePartition>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn create_service( &self, desc: &ServiceDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>

Source

pub async fn update_service( &self, name: &Uri, desc: &ServiceUpdateDescription, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>

Source

pub async fn delete_service( &self, name: &Uri, timeout: Duration, cancellation_token: Option<BoxedCancelToken>, ) -> Result<()>

Trait Implementations§

Source§

impl Clone for ServiceManagementClient

Source§

fn clone(&self) -> ServiceManagementClient

Returns a duplicate 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 Debug for ServiceManagementClient

Source§

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

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

impl From<IFabricServiceManagementClient6> for ServiceManagementClient

Source§

fn from(com: IFabricServiceManagementClient6) -> Self

Converts to this type from the input type.
Source§

impl From<ServiceManagementClient> for IFabricServiceManagementClient6

Source§

fn from(value: ServiceManagementClient) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CanInto<T> for T
where T: Clone,

Source§

const QUERY: bool = false

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, U> Into<U> for T
where 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> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
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