pub struct FabricClientBuilder { /* private fields */ }Implementations§
Source§impl FabricClientBuilder
impl FabricClientBuilder
Sourcepub fn with_on_service_notification<T>(self, f: T) -> Self
pub fn with_on_service_notification<T>(self, f: T) -> Self
Configures the service notification handler.
See details in register_service_notification_filter API.
If the service endpoint change matches the registered filter,
this notification is invoked.
Sourcepub fn with_on_client_connect<T>(self, f: T) -> Self
pub fn with_on_client_connect<T>(self, f: T) -> Self
When FabricClient connects to the SF cluster, this callback is invoked.
Sourcepub fn with_on_client_disconnect<T>(self, f: T) -> Self
pub fn with_on_client_disconnect<T>(self, f: T) -> Self
When FabricClient disconnets to the SF cluster, this callback is called. This callback is not called on Drop of FabricClient.
Sourcepub fn with_on_claims_retrieval<T>(self, f: T) -> Self
pub fn with_on_claims_retrieval<T>(self, f: T) -> Self
Invoked when claim based credential is used, and claims retrieval is needed. The callback payload contains metadata for claims retrieval, and user needs to call AAD or other identity provider to get the claims. The returned claims are used by FabricClient to authenticate to the cluster. If empty claim or error is returned, the default handler inside SF client is invoked for AAD auth.
Sourcepub fn with_client_role(self, role: ClientRole) -> Self
pub fn with_client_role(self, role: ClientRole) -> Self
Sets the role of the client connection. Default is Unknown if not set. Unknown role cannot be used for remote client connection. If connection strings are set, only Unknown is allowed.
Sourcepub fn with_connection_strings(self, addrs: Vec<WString>) -> Self
pub fn with_connection_strings(self, addrs: Vec<WString>) -> Self
Sets the client connection strings. Example value: localhost:19000
Sourcepub fn with_client_settings(self, client_settings: FabricClientSettings) -> Self
pub fn with_client_settings(self, client_settings: FabricClientSettings) -> Self
Sets the client settings
pub fn with_credentials( self, client_credentials: FabricSecurityCredentials, ) -> Self
Sourcepub fn build(self) -> Result<FabricClient, FabricClientCreationError>
pub fn build(self) -> Result<FabricClient, FabricClientCreationError>
Build the fabricclient Remarks: FabricClient connect to SF cluster when the first API call is triggered. Build/create of the object does not establish connection.
Sourcepub fn build_interface<T: Interface>(
self,
) -> Result<T, FabricClientCreationError>
pub fn build_interface<T: Interface>( self, ) -> Result<T, FabricClientCreationError>
Build the specific com interface of the fabric client.