Nebula
Orchestrator

ProcessWorkerHost

Runs every worker as a child process of the orchestrator, from the same executable.

generated from the sources
public sealed class ProcessWorkerHost : IWorkerHost

Runs every worker as a child process of the orchestrator, from the same executable. This is the local mesh (nebula start) and the reference implementation of IWorkerHost. The orchestrator also uses it to start co-located services (the gateway) whatever host the workers use.

Constructors

ProcessWorkerHost

public ProcessWorkerHost(string executable, string advertiseAddress);
ParameterDescription
executablePlayer executable to run; empty = the orchestrator's own.
advertiseAddressAddress child workers advertise to peers (127.0.0.1 on one machine).

Properties

Name

public string Name { get; }

IsReady

public bool IsReady { get; }

InitializationError

public string InitializationError { get; }

Methods

Initialize

public void Initialize(Action<string, string> log);

Launch

public IWorkerHandle Launch(WorkerLaunchSpec spec);

LaunchService

public Process LaunchService(string role, string roleArgs, string logName, string commonArgs);

Start a non-worker role (the gateway) next to the orchestrator. Returns null on failure.

Kill

public void Kill(IWorkerHandle handle);

KillProcess

public static void KillProcess(Process p);

SafePid

public static int SafePid(Process p);

HasExited

public static bool HasExited(Process p);

Tick

public void Tick();

WriteHandleJson

public void WriteHandleJson(IWorkerHandle handle, JsonWriter w);

Dispose

public void Dispose();

On this page