public Daemon( string pathToExecutable, string workingDir, Action <Message> onMessage, Action <Exception> onException, KinesisProducerConfiguration config, IDictionary <string, string> environmentVariables) { this.pathToExecutable = pathToExecutable; this.workingDir = workingDir; this.onMessage = onMessage; this.onException = onException; this.config = config; this.environmentVariables = environmentVariables; this.cancelTokenSource = new CancellationTokenSource(); this.processCancellationToken = cancelTokenSource.Token; this.logger = Logging.CreateLogger <Daemon>(config.LogLevel); Task.Run(() => { try { CreatePipes(); StartChildProcess(); } catch (Exception e) { FatalError("Error running child process", e); } }); }
public KinesisProducer(KinesisProducerConfiguration config) { this.config = config; this.logger.LogInformation($"Platform: {RuntimeInformation.OSDescription}. Arch: {RuntimeInformation.OSArchitecture}"); var caDirectory = ExtractBinaries(); this.envParams = new Dictionary <string, string> { { "LD_LIBRARY_PATH", this.pathToLibDir }, { "DYLD_LIBRARY_PATH", this.pathToLibDir }, { "CA_DIR", caDirectory } }; CreateDaemon(); }
public DaemonUnix(string pathToExecutable, string workingDir, Action <Message> onMessage, Action <Exception> onException, KinesisProducerConfiguration config, IDictionary <string, string> environmentVariables) : base(pathToExecutable, workingDir, onMessage, onException, config, environmentVariables) { }