(
context: Context.Context<never>,
handler: Effect.Effect<A, E, R>,
options: {
readonly rpc: Rpc.AnyWithProps
readonly client: Rpc.ServerClient
readonly requestId: RequestId
readonly headers: Headers.Headers
readonly payload: unknown
}
)
| 462 | }) |
| 463 | |
| 464 | const applyMiddleware = <A, E, R>( |
| 465 | context: Context.Context<never>, |
| 466 | handler: Effect.Effect<A, E, R>, |
| 467 | options: { |
| 468 | readonly rpc: Rpc.AnyWithProps |
| 469 | readonly client: Rpc.ServerClient |
| 470 | readonly requestId: RequestId |
| 471 | readonly headers: Headers.Headers |
| 472 | readonly payload: unknown |
| 473 | } |
| 474 | ) => { |
| 475 | for (const service of options.rpc.middlewares) { |
| 476 | const middleware = Context.getUnsafe(context, service) |
| 477 | handler = middleware(handler as any, options) as any |
| 478 | } |
| 479 | |
| 480 | return handler |
| 481 | } |
| 482 | |
| 483 | /** |
| 484 | * Runs an RPC server for a group using the current server `Protocol`, decoding |
no test coverage detected