MCPcopy Index your code
hub / github.com/Effect-TS/effect / layer

Function layer

packages/rpc/src/RpcServer.ts:736–752  ·  view source on GitHub ↗
(
  group: RpcGroup.RpcGroup<Rpcs>,
  options?: {
    readonly disableTracing?: boolean | undefined
    readonly spanPrefix?: string | undefined
    readonly spanAttributes?: Record<string, unknown> | undefined
    readonly concurrency?: number | "unbounded" | undefined
    readonly disableFatalDefects?: boolean | undefined
  }
)

Source from the content-addressed store, hash-verified

734 * @category server
735 */
736export const layer = <Rpcs extends Rpc.Any>(
737 group: RpcGroup.RpcGroup<Rpcs>,
738 options?: {
739 readonly disableTracing?: boolean | undefined
740 readonly spanPrefix?: string | undefined
741 readonly spanAttributes?: Record<string, unknown> | undefined
742 readonly concurrency?: number | "unbounded" | undefined
743 readonly disableFatalDefects?: boolean | undefined
744 }
745): Layer.Layer<
746 never,
747 never,
748 | Protocol
749 | Rpc.ToHandler<Rpcs>
750 | Rpc.Context<Rpcs>
751 | Rpc.Middleware<Rpcs>
752> => Layer.scopedDiscard(Effect.forkScoped(Effect.interruptible(make(group, options))))
753
754/**
755 * Create a RPC server that registers a HTTP route with a `HttpLayerRouter`.

Callers 1

layerHttpRouterFunction · 0.70

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected