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

Function writeGen

packages/experimental/src/EventLogRemote.ts:264–273  ·  view source on GitHub ↗
(request: typeof ProtocolRequest.Type)

Source from the content-addressed store, hash-verified

262 const writeRaw = yield* socket.writer
263
264 function* writeGen(request: typeof ProtocolRequest.Type) {
265 const data = encodeRequest(request)
266 if (request._tag !== "WriteEntries" || data.byteLength <= constChunkSize) {
267 return yield* writeRaw(data)
268 }
269 const id = request.id
270 for (const part of ChunkedMessage.split(id, data)) {
271 yield* writeRaw(encodeRequest(part))
272 }
273 }
274
275 const write = (request: typeof ProtocolRequest.Type) => Effect.gen(() => writeGen(request))
276

Callers 1

writeFunction · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…