Hyperlinkv0.8.0-beta.28

Process

Process.servefunctionsrc/Process.ts:2591
<Self, S extends Spec, A = void, E = never, R = never>(
  tag: HyperlinkTag<Self, S>,
  config: ProcessLayerConfig<A, E, R>
): Layer.Layer<
  Self | Local<Self> | HandlerContextOf<ProcessSpec> | Store.Storage,
  never,
  R
>

Serve a process and grant its local instance from one materialization.

Soft-defaults Store.Storage. Override with Layer.provide / provideMerge(AppStore).

layers & servingStore.Storage
Source src/Process.ts:259122 lines
export function serve<Self, S extends Spec, A = void, E = never, R = never>(
  tag: HyperlinkTag<Self, S>,
  config: ProcessLayerConfig<A, E, R>,
): Layer.Layer<
  Self | Local<Self> | HandlerContextOf<ProcessSpec> | Store.Storage,
  never,
  R
>;
export function serve(
  tag: HyperlinkTag<any, any, any>,
  config: ProcessLayerConfig<any, any, any>,
): Layer.Layer<any, any, any> {
  const baseTag: HyperlinkTag<any, ProcessSpec> = tag;
  return withDefaultMemory(
    Layer.unwrap(
      Effect.map(
        buildProcessImpl(tag, config),
        (built) => Hyperlink.serve(baseTag, built) as any,
      ),
    ) as any,
  ) as any;
}
Referenced by 1 symbols