MCPcopy Create free account
hub / github.com/effect-app/libs / makeImplLayer

Function makeImplLayer

packages/infra/test/routing-interruptibility.test.ts:23–35  ·  view source on GitHub ↗
(commandDone: Ref.Ref<boolean>, queryDone: Ref.Ref<boolean>)

Source from the content-addressed store, hash-verified

21)
22
23const makeImplLayer = (commandDone: Ref.Ref<boolean>, queryDone: Ref.Ref<boolean>) =>
24 InterruptibilityRpcs.toLayer({
25 doCommand: () =>
26 applyRequestTypeInterruptibility(
27 "command",
28 Effect.sleep("120 millis").pipe(Effect.andThen(Ref.set(commandDone, true)))
29 ),
30 doQuery: () =>
31 applyRequestTypeInterruptibility(
32 "query",
33 Effect.sleep("120 millis").pipe(Effect.andThen(Ref.set(queryDone, true)))
34 )
35 })
36
37describe("routing interruptibility", () => {
38 it.live(

Calls 5

toLayerMethod · 0.65
pipeMethod · 0.65
sleepMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…