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

Function makeOutgoingRequest

packages/cluster/test/Runners.test.ts:138–159  ·  view source on GitHub ↗
(
    rpc: SendRpc,
    requestId: Snowflake.Snowflake,
    respond: (reply: Reply.Reply<SendRpc>) => Effect.Effect<void>
  )

Source from the content-addressed store, hash-verified

136 type SendRpc = typeof TestRpc | typeof TestRpcPersisted
137
138 const makeOutgoingRequest = (
139 rpc: SendRpc,
140 requestId: Snowflake.Snowflake,
141 respond: (reply: Reply.Reply<SendRpc>) => Effect.Effect<void>
142 ): Message.OutgoingRequest<SendRpc> =>
143 new Message.OutgoingRequest({
144 envelope: Envelope.makeRequest<SendRpc>({
145 requestId,
146 address: EntityAddress.make({
147 shardId: ShardId.make("default", 1),
148 entityType: EntityType.EntityType.make("TestRpcEntity"),
149 entityId: EntityId.make("1")
150 }),
151 tag: rpc._tag,
152 payload: { id: 1 },
153 headers: Headers.empty
154 }),
155 rpc,
156 context: Context.empty(),
157 lastReceivedReply: Option.none(),
158 respond
159 })
160
161 const layerFakeProtocol = (
162 onRequest: (

Callers 1

Runners.test.tsFile · 0.85

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected