How to use the enchannel-zmq-backend.createMainChannel function in enchannel-zmq-backend

To help you get started, we’ve selected a few enchannel-zmq-backend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nteract / nteract / applications / desktop / src / notebook / epics / zeromq-kernels.ts View on Github external
"color: black"
          );

          spawn.stdout?.on("data", data => {
            const text = data.toString();
            logStd(text);
            observer.next(actions.kernelRawStdout({ text, kernelRef }));
          });
          spawn.stderr?.on("data", data => {
            const text = data.toString();
            logStd(text);
            observer.next(actions.kernelRawStderr({ text, kernelRef }));
          });

          // do dependency injection of jmp to make it match our ABI version of node
          const channels = await createMainChannel(
            config,
            undefined,
            undefined,
            undefined,
            jmp
          );
          observer.next(
            actions.setKernelspecInfo({
              contentRef,
              kernelInfo: kernelSpec
            })
          );

          const kernel: LocalKernelProps = {
            info: null,
            type: "zeromq",
github nteract / nteract / applications / desktop / src / notebook / epics / zeromq-kernels.ts View on Github external
"color: black"
          );

          spawn.stdout.on("data", data => {
            const text = data.toString();
            logStd(text);
            observer.next(actions.kernelRawStdout({ text, kernelRef }));
          });
          spawn.stderr.on("data", data => {
            const text = data.toString();
            logStd(text);
            observer.next(actions.kernelRawStderr({ text, kernelRef }));
          });

          // do dependency injection of jmp to make it match our ABI version of node
          const channels = await createMainChannel(
            config,
            undefined,
            undefined,
            undefined,
            jmp
          );
          observer.next(
            actions.setKernelspecInfo({
              contentRef,
              kernelInfo: { name: kernelSpec.name, ...kernelSpec.spec }
            })
          );

          const kernel: LocalKernelProps = {
            info: null,
            type: "zeromq",
github nteract / nteract / packages / fs-kernels / src / spawnteract.ts View on Github external
);

  const runningKernel: execa.ExecaChildProcess = execa(
    argv[0],
    argv.slice(1),
    fullSpawnOptions
  );

  if (fullSpawnOptions.cleanupConnectionFile !== false) {
    runningKernel.on("exit", (code, signal) => cleanup(connectionFile));
    runningKernel.on("error", error => cleanup(connectionFile));
  }

  const channels: Subject<
    JupyterMessage
  > = await createMainChannel(config);

  return {
    channels,
    config,
    connectionFile,
    kernelSpec,
    spawn: runningKernel
  };
}
github makebrainwaves / BrainWaves / app / epics / jupyterEpics.js View on Github external
    mergeMap(kernel => from(createMainChannel(kernel.config))),
    tap(mainChannel => mainChannel.next(executeRequest(imports()))),