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

Function layer

packages/effect/src/unstable/rpc/RpcServer.ts:771–787  ·  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

769 * @since 4.0.0
770 */
771export const layer = <Rpcs extends Rpc.Any>(
772 group: RpcGroup.RpcGroup<Rpcs>,
773 options?: {
774 readonly disableTracing?: boolean | undefined
775 readonly spanPrefix?: string | undefined
776 readonly spanAttributes?: Record<string, unknown> | undefined
777 readonly concurrency?: number | "unbounded" | undefined
778 readonly disableFatalDefects?: boolean | undefined
779 }
780): Layer.Layer<
781 never,
782 never,
783 | Protocol
784 | Rpc.ToHandler<Rpcs>
785 | Rpc.Middleware<Rpcs>
786 | Rpc.ServicesServer<Rpcs>
787> => Layer.effectDiscard(Effect.forkScoped(make(group, options)))
788
789/**
790 * Creates a RPC server that registers a HTTP route with a `HttpRouter`.

Callers 1

layerHttpFunction · 0.70

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected