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

Function fromChunkPubSub

packages/effect/src/internal/stream.ts:3028–3035  ·  view source on GitHub ↗
(pubsub, options)

Source from the content-addressed store, hash-verified

3026 readonly shutdown?: boolean | undefined
3027 }): Stream.Stream<A>
3028} = (pubsub, options): any => {
3029 if (options?.scoped) {
3030 const effect = Effect.map(PubSub.subscribe(pubsub), fromChunkQueue)
3031 return options.shutdown ? Effect.map(effect, ensuring(PubSub.shutdown(pubsub))) : effect
3032 }
3033 const stream = flatMap(scoped(PubSub.subscribe(pubsub)), fromChunkQueue)
3034 return options?.shutdown ? ensuring(stream, PubSub.shutdown(pubsub)) : stream
3035}
3036
3037/** @internal */
3038export const fromChunkQueue = <A>(queue: Queue.Dequeue<Chunk.Chunk<A>>, options?: {

Callers

nothing calls this directly

Calls 4

scopedFunction · 0.70
mapMethod · 0.65
subscribeMethod · 0.65
shutdownMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…