IWorkerHost
Where worker instances live.
Nebula.Hosting · Packages/com.1by3.nebula/Runtime/Orchestrator/Hosting/IWorkerHost.cspublic interface IWorkerHost : IDisposableWhere worker instances live. The orchestrator decides how many workers to run and which containers they own; a host decides where one runs and how to start and stop it. The reference host launches local child processes (ProcessWorkerHost); cloud hosts create one VM per worker (HetznerWorkerHost). Liveness is judged from control-plane heartbeats regardless of host; the host's IWorkerHandle.State only lets the orchestrator react sooner when a process exits or a machine disappears. Implementations must be safe to call every frame; slow work happens off the main thread and is surfaced from Tick.
Properties
Name
string Name { get; }"process", "hetzner", ... shown on the dashboard.
IsReady
bool IsReady { get; }True once Initialize finished its asynchronous part and launches can proceed.
InitializationError
string InitializationError { get; }Set when Initialize failed permanently (bad token, missing network); the orchestrator reports it and launches nothing.
Methods
Initialize
void Initialize(Action<string, string> log);Called once before the first launch. Hosts use it to look up cloud resources and to sweep leftovers from a previous orchestrator run (a crashed orchestrator must not leave paid machines behind).
Launch
IWorkerHandle Launch(WorkerLaunchSpec spec);Kill
void Kill(IWorkerHandle handle);Stop the worker immediately (crash semantics: kill the process, delete the machine).
Tick
void Tick();Main thread, every frame: apply results of background work to the handles and refresh their state.
WriteHandleJson
void WriteHandleJson(IWorkerHandle handle, JsonWriter w);Extra host-specific fields for the dashboard's worker entry.