Zum Hauptinhalt springen

OperatorHubClient

Namespace: Meshmakers.Octo.Sdk.ServiceClient.CommunicationControllerServices

Client proxy for the operator management hub of communication controller services. Receives Cloud pool deploy / undeploy notifications from the controller.

public class OperatorHubClient : SignalRClient<OperatorHubClientOptions>, ISignalRClient<OperatorHubClientOptions>, IOperatorHubClient, IOperatorHub

Inheritance Object → SignalRClient<OperatorHubClientOptions> → OperatorHubClient
Implements ISignalRClient<OperatorHubClientOptions>, IOperatorHubClient, IOperatorHub

Properties​

IsAlive​

public bool IsAlive { get; }

Property Value​

Boolean

ClientAccessToken​

public IServiceClientAccessToken ClientAccessToken { get; }

Property Value​

IServiceClientAccessToken

Options​

public OperatorHubClientOptions Options { get; }

Property Value​

OperatorHubClientOptions

ServiceUri​

public Uri ServiceUri { get; }

Property Value​

Uri

Constructors​

OperatorHubClient(OperatorHubClientOptions, ILogger<OperatorHubClient>, IServiceClientAccessToken, IOperatorHubCallbacks)​

Constructor.

public OperatorHubClient(OperatorHubClientOptions serviceClientOptions, ILogger<OperatorHubClient> logger, IServiceClientAccessToken serviceClientAccessToken, IOperatorHubCallbacks operatorHubCallbacks)

Parameters​

serviceClientOptions OperatorHubClientOptions
Options for configuration of the client proxy.

logger ILogger<OperatorHubClient>
Instance of the logger

serviceClientAccessToken IServiceClientAccessToken
The access token management object

operatorHubCallbacks IOperatorHubCallbacks
Callbacks for pool deploy / undeploy notifications

Methods​

RegisterServerCallbacks(HubConnection)​

Binds the server-to-client callbacks on every (re-)created connection so they survive a StopAsync/StartAsync cycle. Registering them in the constructor only bound them to the first connection; after a full restart the fresh connection had no handlers and every pool/workload deploy notification from the controller was silently dropped.

protected void RegisterServerCallbacks(HubConnection hubConnection)

Parameters​

hubConnection HubConnection

BuildServiceUri()​

Builds the service URI without tenant ID prefix (OperatorHub is not tenant-scoped).

protected Uri BuildServiceUri()

Returns​

Uri

RegisterOperatorAsync(Nullable<Boolean>)​

public Task<IEnumerable<DeployedDeploymentSiteDto>> RegisterOperatorAsync(Nullable<bool> autoManageDeploymentSites)

Parameters​

autoManageDeploymentSites Nullable<Boolean>

Returns​

Task<IEnumerable<DeployedDeploymentSiteDto>>

UnregisterOperatorAsync()​

public Task UnregisterOperatorAsync()

Returns​

Task

ReportDeployedStateAsync(IReadOnlyList<OperatorDeployedDeploymentSiteReportDto>)​

public Task ReportDeployedStateAsync(IReadOnlyList<OperatorDeployedDeploymentSiteReportDto> deployedDeploymentSites)

Parameters​

deployedDeploymentSites IReadOnlyList<OperatorDeployedDeploymentSiteReportDto>

Returns​

Task

ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto)​

public Task ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto status)

Parameters​

status WorkloadDeploymentStatusDto

Returns​

Task

ReportWorkloadDeploymentProgressAsync(WorkloadDeploymentProgressDto)​

public Task ReportWorkloadDeploymentProgressAsync(WorkloadDeploymentProgressDto progress)

Parameters​

progress WorkloadDeploymentProgressDto

Returns​

Task

ReportWorkloadScaleStatusAsync(WorkloadScaleStatusDto)​

public Task ReportWorkloadScaleStatusAsync(WorkloadScaleStatusDto status)

Parameters​

status WorkloadScaleStatusDto

Returns​

Task

RegisterDeploymentSiteAsync(String, String)​

public Task RegisterDeploymentSiteAsync(string tenantId, string deploymentSiteRtId)

Parameters​

tenantId String

deploymentSiteRtId String

Returns​

Task

UnregisterDeploymentSiteAsync(String, String)​

public Task UnregisterDeploymentSiteAsync(string tenantId, string deploymentSiteRtId)

Parameters​

tenantId String

deploymentSiteRtId String

Returns​

Task