Hyperlinkv0.8.0-beta.28

Node

<N extends AnyNode>(node: N): N & { readonly isLookupNode: true }

Brand a node as the fleet lookup / identity server — piped onto a Tag node (sibling to withProtocol). Reuses the node verbatim (address, transports, key, served resources) and folds its advertise policy to a concrete default: an explicit { onConflict } survives, while an ordinary node's "inherit" (or none) becomes "livenessReplace" — a lookup root never inherits.

class Directory extends Node.Tag<Directory>()("app/Lookup", { path: "/tmp/lookup.sock" }).pipe(Node.asLookup) {}
class Dual extends Node.Tag<Dual>()("app/Lookup", { http: "http://l/rpc", ws: "ws://l/rpc" }).pipe(Node.asLookup) {}
constructorsTagwithProtocol
export const asLookup = <N extends AnyNode>(
  node: N,
): N & { readonly isLookupNode: true } =>
  Object.assign(node, {
    isLookupNode: true as const,
    onConflict: resolveOnConflict(node.onConflict),
  });
Referenced by 1 symbols