MCPcopy Create free account
hub / github.com/Effect-TS/effect / layer

Function layer

packages/rpc/src/RpcServer.ts:741–757  ·  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

739 * @category server
740 */
741export const layer = <Rpcs extends Rpc.Any>(
742 group: RpcGroup.RpcGroup<Rpcs>,
743 options?: {
744 readonly disableTracing?: boolean | undefined
745 readonly spanPrefix?: string | undefined
746 readonly spanAttributes?: Record<string, unknown> | undefined
747 readonly concurrency?: number | "unbounded" | undefined
748 readonly disableFatalDefects?: boolean | undefined
749 }
750): Layer.Layer<
751 never,
752 never,
753 | Protocol
754 | Rpc.ToHandler<Rpcs>
755 | Rpc.Context<Rpcs>
756 | Rpc.Middleware<Rpcs>
757> => Layer.scopedDiscard(Effect.forkScoped(Effect.interruptible(make(group, options))))
758
759/**
760 * 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