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

Function makeSubscriberQueue

packages/effect/src/TxPubSub.ts:597–611  ·  view source on GitHub ↗
(
  strategy: "bounded" | "unbounded" | "dropping" | "sliding",
  cap: number
)

Source from the content-addressed store, hash-verified

595)
596
597const makeSubscriberQueue = <A>(
598 strategy: "bounded" | "unbounded" | "dropping" | "sliding",
599 cap: number
600): Effect.Effect<TxQueue.TxQueue<A>> => {
601 switch (strategy) {
602 case "bounded":
603 return TxQueue.bounded<A>(cap)
604 case "dropping":
605 return TxQueue.dropping<A>(cap)
606 case "sliding":
607 return TxQueue.sliding<A>(cap)
608 case "unbounded":
609 return TxQueue.unbounded<A>()
610 }
611}
612
613/**
614 * Shuts down the TxPubSub and all subscriber queues registered at the time of shutdown.

Callers 1

acquireSubscriberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected