Hyperlinkv0.8.0-beta.28

QueueHyperlink

QueueHyperlink.serveRemoteconstsrc/QueueHyperlink.ts:1416
<
  Self,
  F extends QueueItemFields = QueueItemFields,
  R = never,
  RR = never,
  Success extends Schema.Top = Schema.Void,
  Error extends Schema.Top = Schema.Never
>(
  tag: QueueTagFor<Self, F, Success, Error>,
  config: QueueVerbConfig<F, QueueErrorValueOf<Error>, R, RR, Success>
): any

Serve this queue remotely (served-only) — run the worker / refill / persist engine behind the tag, mount its RPC handlers, and register into Hyperlink.servedHyperlinksLayer, without granting the local instance (no yield* Tag in the serving process). The engine's worker requirement R is preserved, so a per-resource Layer.provide discharges it in isolation — the queue's counterpart to Hyperlink.serveRemote.

Reach for this (with Node.httpServer) for a pure gateway/edge that exposes the queue for remote clients but never consumes it locally; use serve when the serving node also drives it.

Node.httpServer([
  QueueHyperlink.serveRemote(RosterImportQueue, rosterCfg).pipe(Layer.provide(emptyHookSource)),
  QueueHyperlink.serveRemote(MediaImportQueue,  mediaCfg).pipe(Layer.provide(emptyHookSource)),
]).pipe(Layer.provide(NodeHttpServer.layer(() => createServer(), { port })));
export const serveRemote = <
  Self,
  F extends QueueItemFields = QueueItemFields,
  R = never,
  RR = never,
  Success extends Schema.Top = typeof Schema.Void,
  Error extends Schema.Top = typeof Schema.Never,
>(
  tag: QueueTagFor<Self, F, Success, Error>,
  config: QueueVerbConfig<F, QueueErrorValueOf<Error>, R, RR, Success>,
) =>
  withDefaultMemory(
    Layer.unwrap(
      Effect.map(buildQueueImpl(tag, config), (built) =>
        Hyperlink.serveRemote(tag, built) as any,
      ),
    ) as any,
  ) as any;
Referenced by 1 symbols