pub struct ServiceManagementClient { /* private fields */ }

Implementations§

source§

impl ServiceManagementClient

source

pub fn from_com(com: IFabricServiceManagementClient6) -> Self

source

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

source

pub async fn restart_replica( &self, desc: &RestartReplicaDescription, timeout: Duration, cancellation_token: Option<CancellationToken>, ) -> 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<CancellationToken>, ) -> 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<CancellationToken>, ) -> 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. TODO: explore the relation to IFabricServiceNotification. 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<CancellationToken>, ) -> 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.

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