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

Function renderSseEvent

packages/effect/src/unstable/httpapi/HttpApiBuilder.ts:1082–1089  ·  view source on GitHub ↗
(event: Sse.EventEncoded)

Source from the content-addressed store, hash-verified

1080const reservedStreamFailureEvent = "effect/httpapi/stream/failure"
1081
1082function renderSseEvent(event: Sse.EventEncoded) {
1083 return Sse.encoder.write({
1084 _tag: "Event",
1085 event: event.event,
1086 id: event.id,
1087 data: event.data
1088 })
1089}
1090
1091const toResponseSuccessSchema = toResponseSchema(HttpApiSchema.getStatusSuccessSchema)
1092const toResponseErrorSchemaPlain = toResponseSchema(HttpApiSchema.getStatusErrorSchema)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected