Hyperlinkv0.9.0-beta.0

Node

Node.ListenOptionstypesrc/internal/nodeCore.ts:288
ListenOptions

Shared options for unix / http / ws (and low-level *Server) — rpc path / health / ipc unlink, plus optional fixed listen address for nameless Http/Ws.

modelsunixhttpws
export type ListenOptions = {
  readonly path?: HttpRouter.PathInput;
  readonly serialization?: Layer.Layer<RpcSerialization.RpcSerialization>;
  readonly health?: { readonly path?: HttpRouter.PathInput };
  readonly node?: string | { readonly key: string };
  readonly unlink?: boolean;
  /**
   * Directory advertise conflict policy for this listen (call-site; wins over node stamp).
   * Omit / `"inherit"` → continue resolve chain.
   */
  readonly onConflict?: OnConflict;
  /**
   * Fixed listen address for nameless / address-less {@link http} / {@link ws}.
   * `port` is loopback shorthand (`http://127.0.0.1:<port>/rpc` or `ws://…`).
   * `url` wins when both are set; battery bind still requires a loopback url (non-loopback
   * → use {@link httpServer} / {@link wsServer} + your platform layer).
   * Omit both for an ephemeral loopback port (`port: 0`).
   */
  readonly port?: number;
  readonly url?: string;
  /**
   * Expected launcher ownership-ack token for {@link Node.assume}. When set, node status
   * mirrors `ownership: "launcher" | "self"`. Injection into the child is open (env / argv /
   * {@link Config}); this option only arms the handshake on the listening node.
   */
  readonly assumeToken?: string | Redacted.Redacted<string>;
  /**
   * Cooperative directory handoff handler for Lookup {@link OnConflict} `"askIncumbent"` —
   * wired to the auto-mounted node-status `yield` RPC. `true` = step aside (row may replace);
   * `false` / timeout → newcomer sees Lookup `IncumbentAlive`. Default when omitted: accept.
   * Does **not** drain work or shut down the process (Track C).
   */
  readonly onYield?: Effect.Effect<boolean>;
};
Referenced by 6 symbols