Hyperlinkv0.9.0-beta.0

Node

Node.ipcServerfunctionsrc/internal/nodeIpcServer.ts:100
<A, E, R>(
  serve: Layer.Layer<A, E, R>,
  options: IpcServerOptions
): Layer.Layer<A, E, R>
<const Serves extends ServerServeList>(
  serves: Serves,
  options: IpcServerOptions
): Layer.Layer<
  Layer.Success<Serves[number]>,
  Layer.Error<Serves[number]>,
  Layer.Services<Serves[number]>
>

A Unix-domain RPC server — same-machine sibling of httpServer / wsServer. Speaks Effect's raw socket RPC protocol (RpcServer.layerProtocolSocketServer) over a filesystem path — no HTTP, no WebSocket upgrade. Clients connect with connectIpc or a node whose ProtocolKind is "IpcSocket" (Tag()("x", { path })).

class Worker extends Tag<Worker>()("worker", { path: "/tmp/worker.sock" }) {}

const live = Hyperlink.ipcServer(
  [Hyperlink.serve(Jobs, jobsImpl)],
  { path: "/tmp/worker.sock" },
)
// or Node.unix(Worker, [Hyperlink.serve(Jobs, jobsImpl)])

Auto-mounts node status/logs/ping like the http/ws servers. There is no /health HTTP route (no HTTP listener) — probe readiness via the node-handle status RPC.

servershttpServerwsServerconnectIpcProtocolKind
export function ipcServer<A, E, R>(
  serve: Layer.Layer<A, E, R>,
  options: IpcServerOptions,
): Layer.Layer<A, E, R>;
export function ipcServer<const Serves extends ServerServeList>(
  serves: Serves,
  options: IpcServerOptions,
): Layer.Layer<
  Layer.Success<Serves[number]>,
  Layer.Error<Serves[number]>,
  Layer.Services<Serves[number]>
>;
export function ipcServer(
  serves: ServerServeLayer | ServerServeList,
  options: IpcServerOptions,
): Layer.Any {
  const list = toServeList(serves);
  return ipcServerBase(options).pipe(
    Layer.provideMerge(closedLayer(mergeServeList(list))),
    // Fresh registry per server — Lookup + Worker in one process must not share.
    Layer.provide(Layer.fresh(Hyperlink.servedHyperServicesLayer)),
  );
}
Referenced by 1 symbols