IOperatorHub
Namespace: Meshmakers.Octo.Communication.Contracts.Hubs
Server-side hub interface for operator management connections. Used by the central Communication Operator to register for Cloud pool deploy / undeploy notifications.
public interface IOperatorHub
Methods
RegisterOperatorAsync(Nullable<Boolean>)
Registers the operator for receiving Cloud pool deploy / undeploy events.
Task<IEnumerable<DeployedPoolDto>> RegisterOperatorAsync(Nullable<bool> autoManagePools)
Parameters
autoManagePools Nullable<Boolean>
The calling operator's AutoManagePools setting:
true = central operator (creates / deletes CRs in response to
controller broadcasts), false = edge operator (CRs are managed
out-of-band on the edge cluster). The controller stores this per
connection and validates it against RtPool.Environment on every
IOperatorHub.RegisterPoolAsync(String, String) call so a Cloud pool cannot be claimed
by an edge operator (and vice versa). null means the operator
did not declare a mode (legacy build pre-dating this parameter); the
controller logs and audit-records the registration but does not
enforce mode/environment matching, so a rolling upgrade does not break
existing connections.
Returns
Task<IEnumerable<DeployedPoolDto>>
All currently-deployed Cloud pools across every tenant, so a freshly
(re)connected operator can synchronize its desired state without
missing pools that were deployed while it was offline.
UnregisterOperatorAsync()
Unregisters the operator from receiving pool deploy / undeploy events.
Task UnregisterOperatorAsync()
Returns
ReportDeployedStateAsync(IReadOnlyList<OperatorDeployedPoolReportDto>)
Self-healing reverse-sync called by a Cloud operator after
IOperatorHub.RegisterOperatorAsync(Nullable<Boolean>) on a fresh connection. The
operator reports every pool / workload it currently has a healthy
helm release for, and the controller restores
DeploymentState=Deployed on any entity that is not already
Deployed — closing the "operator restarts → tracking lost,
CommunicationState ≠ DeploymentState" gap without requiring a
human to re-click Deploy.
Edge operators (AutoManagePools=false) and operators that
did not declare a mode are rejected with a HubException;
the Cloud-only restriction matches the existing pool-environment
enforcement on IOperatorHub.RegisterPoolAsync(String, String). Pools whose
Environment is not Cloud are silently skipped inside the
handler.
Task ReportDeployedStateAsync(IReadOnlyList<OperatorDeployedPoolReportDto> deployedPools)
Parameters
deployedPools IReadOnlyList<OperatorDeployedPoolReportDto>
Returns
ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto)
Reports the outcome of a per-workload helm upgrade --install
back to the controller. The controller writes the result onto the
runtime entity's DeploymentState / StatusMessage
attributes so the UI reflects what actually happened in the
cluster — without this call, a failed helm run would only be
visible in operator logs.
Task ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto status)
Parameters
status WorkloadDeploymentStatusDto
Returns
ReportWorkloadDeploymentProgressAsync(WorkloadDeploymentProgressDto)
Live progress report fired while a helm upgrade --install is
still in flight. The operator polls the cluster for failure-relevant
pod / event signals (ImagePullBackOff, FailedScheduling,
CrashLoopBackOff, …) and pushes them through this channel so the UI
reflects the root cause within seconds, rather than waiting for the
terminal IOperatorHub.ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto) at the
end of helm's atomic timeout.
Controller writes StatusMessage only and leaves
DeploymentState at Pending — helm may still recover
(e.g. transient registry outage), so the terminal state machine
stays owned by IOperatorHub.ReportWorkloadDeploymentStatusAsync(WorkloadDeploymentStatusDto).
Task ReportWorkloadDeploymentProgressAsync(WorkloadDeploymentProgressDto progress)
Parameters
progress WorkloadDeploymentProgressDto
Returns
RegisterPoolAsync(String, String)
Registers a CommunicationPool the operator currently manages. The
controller writes the pool's CommunicationState to
Online and remembers the operator's SignalR connection id, so
that when the connection drops every pool registered through it goes
back to Offline automatically (via the hub's
OnDisconnectedAsync).
The (tenant, poolRtId) tuple is the controller-side lookup key:
stable across pool renames, DNS-safe, and what the operator uses
for every derived Kubernetes resource (CR name, broker secret,
release name). The human-readable pool display name lives on the
controller's RtPool.Name attribute and surfaces in Studio;
it is not sent over the wire.
Replaces the legacy per-pool /poolHub connection — each
operator now keeps a single multiplexed /operatorHub channel
regardless of how many pools it owns.
Task RegisterPoolAsync(string tenantId, string poolRtId)
Parameters
tenantId String
poolRtId String
Returns
UnregisterPoolAsync(String, String)
Unregisters a CommunicationPool. The controller flips the pool's
CommunicationState to Unregistered and forgets the
(connection, tenant, poolRtId) tuple. Called by the operator when
its CommunicationPool CR is deleted (graceful shutdown of
one pool while the operator keeps running for others).
Task UnregisterPoolAsync(string tenantId, string poolRtId)
Parameters
tenantId String
poolRtId String