Dela via


FabricClient Class

Definition

Creates and manages Service Fabric services and other entities.

public sealed class FabricClient : IDisposable
type FabricClient = class
    interface IDisposable
Public NotInheritable Class FabricClient
Implements IDisposable
Inheritance
FabricClient
Implements

Remarks

It is highly recommended that you share FabricClients as much as possible. This is because the FabricClient has multiple optimizations such as caching and batching that you would not be able to fully utilize otherwise.

Constructors

FabricClient()

Initializes a new instance of the FabricClient class. This constructor should be used by code that is running inside the cluster. It allows the FabricClient instance to connect to the cluster via the local Gateway service running on the same node.

FabricClient(FabricClientRole)

Initializes a new instance of the FabricClient class with the specified fabric client role - FabricClientRole.

FabricClient(FabricClientSettings, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses and the desired FabricClientSettings.

FabricClient(FabricClientSettings)

Initializes a new instance of the FabricClient class with the desired FabricClientSettings. If the FabricClient is on the same cluster as the service, then use a Local FabricClient. Local FabricClient is a feature of Service Fabric that allows the FabricClient to connect to the local Gateway Service instead of choosing from a list. This way, your client can bypass an extra network hop. In case a service is resolving another service partition in the same cluster, then it is recommended that you use Local FabricClient, as it enables automatic load balancing and improves performance.

FabricClient(SecurityCredentials, FabricClientSettings, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses, SecurityCredentials and FabricClientSettings.

FabricClient(SecurityCredentials, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses and SecurityCredentials.

FabricClient(SecurityCredentials, TimeSpan, String[])
Obsolete.

DEPRECATED. Initializes a new instance of the FabricClient class with given credentials, keepAliveInterval and Service Fabric Gateway addresses (hostEndpoints).

FabricClient(String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses. These host-endpoints are list of ':' delimited strings where the first part is the ip of the cluster and the second part is the client-connection endpoint-port.

FabricClient(TimeSpan, String[])
Obsolete.

DEPRECATED. Initializes a new instance of the FabricClient class with given keepAliveInterval and Service Fabric Gateway addresses (hostEndpoints).

Fields

FabricSystemApplication

The Service Fabric System application.

Properties

ApplicationManager

Gets the ApplicationManager that can be used to perform operations related to applications and application types.

ClusterManager

Gets the ClusterManager that can be used to perform operations related to the Service Fabric cluster.

ComposeDeploymentManager

Gets the FabricClient.ComposeDeploymentClient that can be used to perform operations related to compose deployment.

FaultManager

Gets the FabricClient.FaultManagementClient to induce faults. For example, RestartNodeAsync.

HealthManager

Gets the health client that can be used to perform health related operations, like report health or get entity health.

InfrastructureManager

Gets the FabricClient.InfrastructureServiceClient that can be used to perform operations related to the infrastructure on which the cluster is running.

This property supports the Service Fabric platform; it is not meant to be called directly from your code.

NetworkManager

Gets the FabricClient.NetworkManagementClient to manage container networks.

PropertyManager

Gets the PropertyManager that can be used to perform operations related to names and properties.

QueryManager

Gets the query manager that can be used to execute queries against the Service Fabric cluster.

RepairManager

Gets the FabricClient.RepairManagementClient that can be used to manage repair tasks.

This property supports the Service Fabric platform; it is not meant to be called directly from your code.

SecretStore

Gets secret store client

ServiceGroupManager

Gets the ServiceGroupManager that can be used to perform operations related to service groups.

ServiceManager

Gets the ServiceManager that can be used to perform operations related to services and service types.

Settings

Gets the fabric client settings.

TestManager

Gets the FabricClient.TestManagementClient to perform complex actions that go through FaultAnalysisService. For example, StartPartitionDataLossAsync. This also supports APIs for validation (that do not go through FaultAnalysisService). For example, ValidateServiceAsync.

Methods

Dispose()

Disposes of the fabric client.

Finalize()

Destructor of fabric client.

UpdateSecurityCredentials(SecurityCredentials)

Updates the fabric client security credentials.

UpdateSettings(FabricClientSettings)

Updates the fabric client settings.

Events

ClaimsRetrieval

Occurs when the client needs to provide a claims token for authorization with the gateway

ClientConnected

Occurs when the client is connected to gateway.

ClientDisconnected

Occurs when the client is disconnected from the gateway.

Applies to