ControlPlaneExtensions
Provides the control plane extensions API.
Nebula · Packages/com.1by3.nebula/Runtime/ControlPlane/IControlPlane.cspublic static class ControlPlaneExtensionsProvides the control plane extensions API.
Methods
FindWorker
public static WorkerInfo FindWorker(this IControlPlane cp, string workerId);FindGateway
public static GatewayInfo FindGateway(this IControlPlane cp, string gatewayId);FindLease
public static LeaseInfo FindLease(this IControlPlane cp, string containerId);FindScope
public static ScopeInfo FindScope(this IControlPlane cp, string scopeKey);The scope row for scopeKey, or null when the key has not been activated here yet.
IsScopeReady
public static bool IsScopeReady(this IControlPlane cp, ScopeInfo scope, float workerTimeoutSeconds = 15f);
public static bool IsScopeReady(this IControlPlane cp, string scopeKey, float workerTimeoutSeconds = 15f);Whether the scope can be entered: every container of it has a lease row in an owning state (LeaseState.IsOwning) held by a worker that is still heartbeating. It does not say that the worker has loaded the scope's content — that stays with the per-crossing handshake (NebulaWorker.PrepareTransfer). See docs/scope-activation.md §4.
CapacityOf
public static CapacityInfo CapacityOf(this IControlPlane cp, string containerId);How full a container is, as the orchestrator last published it (NebulaCapacity.Of).
ScopeCapacityOf
public static CapacityInfo ScopeCapacityOf(this IControlPlane cp, string scopeKey);How full a whole scope is: the worst of its parts (NebulaCapacity.OfScope).
GetSetting
public static string GetSetting(this IControlPlane cp, string key, string fallback = null);GetSettingInt
public static int GetSettingInt(this IControlPlane cp, string key, int fallback);IsWorkerAlive
public static bool IsWorkerAlive(this IControlPlane cp, WorkerInfo w, float timeoutSeconds);WorkerScaler
Decides when the mesh should gain or lose a worker, by asking the assignment policy what it would do rather than dividing an abstract cost by a worker count.
ControlPlaneHost
The control plane as the orchestrator hosts it: a LocalControlPlane that is the source of truth, served to workers and gateways over the orchestrator's HTTP server and kept in an IControlPlaneStorage between runs.