effect 4.0.0-beta.17 → 4.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts +127 -299
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +102 -62
- package/dist/Array.js.map +1 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +5 -4
- package/dist/Cache.js.map +1 -1
- package/dist/Channel.d.ts +97 -11
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +72 -29
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +54 -247
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +36 -67
- package/dist/Chunk.js.map +1 -1
- package/dist/Effect.d.ts +337 -437
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +118 -134
- package/dist/Effect.js.map +1 -1
- package/dist/Filter.d.ts +0 -33
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +0 -13
- package/dist/Filter.js.map +1 -1
- package/dist/HashMap.d.ts +15 -14
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +4 -4
- package/dist/HashMap.js.map +1 -1
- package/dist/Iterable.d.ts +40 -39
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +94 -22
- package/dist/Iterable.js.map +1 -1
- package/dist/Option.d.ts +22 -15
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +14 -7
- package/dist/Option.js.map +1 -1
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +1 -1
- package/dist/Pull.js.map +1 -1
- package/dist/Record.d.ts +24 -120
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +21 -41
- package/dist/Record.js.map +1 -1
- package/dist/Sink.d.ts +11 -11
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +53 -6
- package/dist/Sink.js.map +1 -1
- package/dist/Stream.d.ts +198 -386
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +103 -59
- package/dist/Stream.js.map +1 -1
- package/dist/Trie.d.ts +18 -17
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +5 -5
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +37 -37
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +3 -3
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +328 -0
- package/dist/TxDeferred.d.ts.map +1 -0
- package/dist/TxDeferred.js +196 -0
- package/dist/TxDeferred.js.map +1 -0
- package/dist/TxHashMap.d.ts +84 -83
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +24 -24
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +35 -35
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +14 -14
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +609 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -0
- package/dist/TxPriorityQueue.js +415 -0
- package/dist/TxPriorityQueue.js.map +1 -0
- package/dist/TxPubSub.d.ts +585 -0
- package/dist/TxPubSub.d.ts.map +1 -0
- package/dist/TxPubSub.js +521 -0
- package/dist/TxPubSub.js.map +1 -0
- package/dist/TxQueue.d.ts +32 -32
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +26 -26
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +523 -0
- package/dist/TxReentrantLock.d.ts.map +1 -0
- package/dist/TxReentrantLock.js +504 -0
- package/dist/TxReentrantLock.js.map +1 -0
- package/dist/TxRef.d.ts +34 -34
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +21 -14
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +8 -8
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +7 -7
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +508 -0
- package/dist/TxSubscriptionRef.d.ts.map +1 -0
- package/dist/TxSubscriptionRef.js +293 -0
- package/dist/TxSubscriptionRef.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js +99 -42
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/hashMap.js +3 -2
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/trie.js +5 -4
- package/dist/internal/trie.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +0 -9
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +1 -1
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +4 -4
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/encoding/Sse.js +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +1 -2
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +190 -342
- package/src/Cache.ts +6 -5
- package/src/Channel.ts +506 -102
- package/src/Chunk.ts +81 -268
- package/src/Effect.ts +437 -518
- package/src/Filter.ts +0 -57
- package/src/HashMap.ts +15 -14
- package/src/Iterable.ts +105 -50
- package/src/Option.ts +30 -20
- package/src/Pull.ts +1 -1
- package/src/Record.ts +43 -152
- package/src/Sink.ts +75 -23
- package/src/Stream.ts +442 -502
- package/src/Trie.ts +18 -17
- package/src/TxChunk.ts +72 -53
- package/src/TxDeferred.ts +394 -0
- package/src/TxHashMap.ts +332 -285
- package/src/TxHashSet.ts +111 -116
- package/src/TxPriorityQueue.ts +767 -0
- package/src/TxPubSub.ts +789 -0
- package/src/TxQueue.ts +241 -251
- package/src/TxReentrantLock.ts +753 -0
- package/src/TxRef.ts +50 -38
- package/src/TxSemaphore.ts +29 -32
- package/src/TxSubscriptionRef.ts +639 -0
- package/src/index.ts +45 -0
- package/src/internal/effect.ts +368 -163
- package/src/internal/hashMap.ts +7 -5
- package/src/internal/trie.ts +16 -9
- package/src/unstable/ai/Tool.ts +0 -9
- package/src/unstable/cli/Command.ts +6 -4
- package/src/unstable/cluster/K8sHttpClient.ts +4 -4
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/encoding/Sse.ts +1 -1
- package/src/unstable/rpc/RpcServer.ts +1 -7
- package/src/unstable/socket/Socket.ts +9 -11
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TxPubSub is a transactional publish/subscribe hub that provides Software Transactional Memory
|
|
3
|
+
* (STM) semantics for message broadcasting. Publishers broadcast messages to all current
|
|
4
|
+
* subscribers, with each subscriber receiving its own copy of every published message.
|
|
5
|
+
*
|
|
6
|
+
* Supports multiple queue strategies: bounded, unbounded, dropping, and sliding.
|
|
7
|
+
*
|
|
8
|
+
* @since 4.0.0
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "./Effect.ts";
|
|
11
|
+
import type { Inspectable } from "./Inspectable.ts";
|
|
12
|
+
import type { Pipeable } from "./Pipeable.ts";
|
|
13
|
+
import type * as Scope from "./Scope.ts";
|
|
14
|
+
import * as TxQueue from "./TxQueue.ts";
|
|
15
|
+
declare const TypeId = "~effect/transactions/TxPubSub";
|
|
16
|
+
/**
|
|
17
|
+
* A TxPubSub represents a transactional publish/subscribe hub that broadcasts messages
|
|
18
|
+
* to all current subscribers using Software Transactional Memory (STM) semantics.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
23
|
+
*
|
|
24
|
+
* const program = Effect.gen(function*() {
|
|
25
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
26
|
+
*
|
|
27
|
+
* yield* Effect.scoped(
|
|
28
|
+
* Effect.gen(function*() {
|
|
29
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
30
|
+
* yield* TxPubSub.publish(hub, "hello")
|
|
31
|
+
* const msg = yield* TxQueue.take(sub)
|
|
32
|
+
* console.log(msg) // "hello"
|
|
33
|
+
* })
|
|
34
|
+
* )
|
|
35
|
+
* })
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @since 4.0.0
|
|
39
|
+
* @category models
|
|
40
|
+
*/
|
|
41
|
+
export interface TxPubSub<in out A> extends Inspectable, Pipeable {
|
|
42
|
+
readonly [TypeId]: typeof TypeId;
|
|
43
|
+
readonly strategy: "bounded" | "unbounded" | "dropping" | "sliding";
|
|
44
|
+
readonly capacity: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Creates a bounded TxPubSub with the specified capacity. When a subscriber's
|
|
48
|
+
* queue is full, the publisher will retry the transaction until space is available.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
53
|
+
*
|
|
54
|
+
* const program = Effect.gen(function*() {
|
|
55
|
+
* const hub = yield* TxPubSub.bounded<number>(16)
|
|
56
|
+
*
|
|
57
|
+
* yield* Effect.scoped(
|
|
58
|
+
* Effect.gen(function*() {
|
|
59
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
60
|
+
* yield* TxPubSub.publish(hub, 42)
|
|
61
|
+
* const value = yield* TxQueue.take(sub)
|
|
62
|
+
* console.log(value) // 42
|
|
63
|
+
* })
|
|
64
|
+
* )
|
|
65
|
+
* })
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @since 4.0.0
|
|
69
|
+
* @category constructors
|
|
70
|
+
*/
|
|
71
|
+
export declare const bounded: <A = never>(capacity: number) => Effect.Effect<TxPubSub<A>, never, Effect.Transaction>;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a dropping TxPubSub with the specified capacity. When a subscriber's
|
|
74
|
+
* queue is full, the message is dropped for that subscriber.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
79
|
+
*
|
|
80
|
+
* const program = Effect.gen(function*() {
|
|
81
|
+
* const hub = yield* TxPubSub.dropping<number>(2)
|
|
82
|
+
*
|
|
83
|
+
* yield* Effect.scoped(
|
|
84
|
+
* Effect.gen(function*() {
|
|
85
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
86
|
+
* yield* TxPubSub.publish(hub, 1)
|
|
87
|
+
* yield* TxPubSub.publish(hub, 2)
|
|
88
|
+
* yield* TxPubSub.publish(hub, 3) // dropped
|
|
89
|
+
* const v1 = yield* TxQueue.take(sub)
|
|
90
|
+
* const v2 = yield* TxQueue.take(sub)
|
|
91
|
+
* console.log(v1, v2) // 1 2
|
|
92
|
+
* })
|
|
93
|
+
* )
|
|
94
|
+
* })
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @since 4.0.0
|
|
98
|
+
* @category constructors
|
|
99
|
+
*/
|
|
100
|
+
export declare const dropping: <A = never>(capacity: number) => Effect.Effect<TxPubSub<A>, never, Effect.Transaction>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates a sliding TxPubSub with the specified capacity. When a subscriber's
|
|
103
|
+
* queue is full, the oldest message in that subscriber's queue is dropped.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
108
|
+
*
|
|
109
|
+
* const program = Effect.gen(function*() {
|
|
110
|
+
* const hub = yield* TxPubSub.sliding<number>(2)
|
|
111
|
+
*
|
|
112
|
+
* yield* Effect.scoped(
|
|
113
|
+
* Effect.gen(function*() {
|
|
114
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
115
|
+
* yield* TxPubSub.publish(hub, 1)
|
|
116
|
+
* yield* TxPubSub.publish(hub, 2)
|
|
117
|
+
* yield* TxPubSub.publish(hub, 3) // evicts 1
|
|
118
|
+
* const v1 = yield* TxQueue.take(sub)
|
|
119
|
+
* console.log(v1) // 2
|
|
120
|
+
* })
|
|
121
|
+
* )
|
|
122
|
+
* })
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @since 4.0.0
|
|
126
|
+
* @category constructors
|
|
127
|
+
*/
|
|
128
|
+
export declare const sliding: <A = never>(capacity: number) => Effect.Effect<TxPubSub<A>, never, Effect.Transaction>;
|
|
129
|
+
/**
|
|
130
|
+
* Creates an unbounded TxPubSub with unlimited capacity. Messages are always accepted.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
135
|
+
*
|
|
136
|
+
* const program = Effect.gen(function*() {
|
|
137
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
138
|
+
*
|
|
139
|
+
* yield* Effect.scoped(
|
|
140
|
+
* Effect.gen(function*() {
|
|
141
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
142
|
+
* yield* TxPubSub.publish(hub, "msg")
|
|
143
|
+
* const msg = yield* TxQueue.take(sub)
|
|
144
|
+
* console.log(msg) // "msg"
|
|
145
|
+
* })
|
|
146
|
+
* )
|
|
147
|
+
* })
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @since 4.0.0
|
|
151
|
+
* @category constructors
|
|
152
|
+
*/
|
|
153
|
+
export declare const unbounded: <A = never>() => Effect.Effect<TxPubSub<A>, never, Effect.Transaction>;
|
|
154
|
+
/**
|
|
155
|
+
* Returns the capacity of the TxPubSub.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* import { Effect, TxPubSub } from "effect"
|
|
160
|
+
*
|
|
161
|
+
* const program = Effect.gen(function*() {
|
|
162
|
+
* const hub = yield* TxPubSub.bounded<number>(16)
|
|
163
|
+
* console.log(TxPubSub.capacity(hub)) // 16
|
|
164
|
+
* })
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* @since 4.0.0
|
|
168
|
+
* @category getters
|
|
169
|
+
*/
|
|
170
|
+
export declare const capacity: <A>(self: TxPubSub<A>) => number;
|
|
171
|
+
/**
|
|
172
|
+
* Returns the current number of messages across all subscriber queues (the max).
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
177
|
+
*
|
|
178
|
+
* const program = Effect.gen(function*() {
|
|
179
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
180
|
+
*
|
|
181
|
+
* yield* Effect.scoped(
|
|
182
|
+
* Effect.gen(function*() {
|
|
183
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
184
|
+
* yield* TxPubSub.publish(hub, 1)
|
|
185
|
+
* yield* TxPubSub.publish(hub, 2)
|
|
186
|
+
* const s = yield* TxPubSub.size(hub)
|
|
187
|
+
* console.log(s) // 2
|
|
188
|
+
* })
|
|
189
|
+
* )
|
|
190
|
+
* })
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @since 4.0.0
|
|
194
|
+
* @category getters
|
|
195
|
+
*/
|
|
196
|
+
export declare const size: <A>(self: TxPubSub<A>) => Effect.Effect<number, never, Effect.Transaction>;
|
|
197
|
+
/**
|
|
198
|
+
* Checks if the TxPubSub has no pending messages (all subscriber queues are empty).
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* import { Effect, TxPubSub } from "effect"
|
|
203
|
+
*
|
|
204
|
+
* const program = Effect.gen(function*() {
|
|
205
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
206
|
+
* const empty = yield* TxPubSub.isEmpty(hub)
|
|
207
|
+
* console.log(empty) // true
|
|
208
|
+
* })
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* @since 4.0.0
|
|
212
|
+
* @category getters
|
|
213
|
+
*/
|
|
214
|
+
export declare const isEmpty: <A>(self: TxPubSub<A>) => Effect.Effect<boolean, never, Effect.Transaction>;
|
|
215
|
+
/**
|
|
216
|
+
* Checks if any subscriber queue is at capacity.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* import { Effect, TxPubSub } from "effect"
|
|
221
|
+
*
|
|
222
|
+
* const program = Effect.gen(function*() {
|
|
223
|
+
* const hub = yield* TxPubSub.bounded<number>(2)
|
|
224
|
+
* const full = yield* TxPubSub.isFull(hub)
|
|
225
|
+
* console.log(full) // false
|
|
226
|
+
* })
|
|
227
|
+
* ```
|
|
228
|
+
*
|
|
229
|
+
* @since 4.0.0
|
|
230
|
+
* @category getters
|
|
231
|
+
*/
|
|
232
|
+
export declare const isFull: <A>(self: TxPubSub<A>) => Effect.Effect<boolean, never, Effect.Transaction>;
|
|
233
|
+
/**
|
|
234
|
+
* Checks if the TxPubSub has been shut down.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* import { Effect, TxPubSub } from "effect"
|
|
239
|
+
*
|
|
240
|
+
* const program = Effect.gen(function*() {
|
|
241
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
242
|
+
* console.log(yield* TxPubSub.isShutdown(hub)) // false
|
|
243
|
+
* yield* TxPubSub.shutdown(hub)
|
|
244
|
+
* console.log(yield* TxPubSub.isShutdown(hub)) // true
|
|
245
|
+
* })
|
|
246
|
+
* ```
|
|
247
|
+
*
|
|
248
|
+
* @since 4.0.0
|
|
249
|
+
* @category getters
|
|
250
|
+
*/
|
|
251
|
+
export declare const isShutdown: <A>(self: TxPubSub<A>) => Effect.Effect<boolean, never, Effect.Transaction>;
|
|
252
|
+
/**
|
|
253
|
+
* Publishes a message to all current subscribers.
|
|
254
|
+
*
|
|
255
|
+
* Returns `true` if the message was delivered to all subscribers, or `false` if
|
|
256
|
+
* the hub is shut down or the message was dropped for any subscriber (dropping strategy).
|
|
257
|
+
*
|
|
258
|
+
* For bounded strategy, retries the transaction if any subscriber queue is full.
|
|
259
|
+
* For sliding strategy, drops oldest messages in full subscriber queues.
|
|
260
|
+
* For dropping strategy, drops the message for full subscriber queues and returns `false`.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```ts
|
|
264
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
265
|
+
*
|
|
266
|
+
* const program = Effect.gen(function*() {
|
|
267
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
268
|
+
*
|
|
269
|
+
* // No subscribers - publish is a no-op
|
|
270
|
+
* const r1 = yield* TxPubSub.publish(hub, "no one listening")
|
|
271
|
+
* console.log(r1) // true
|
|
272
|
+
*
|
|
273
|
+
* yield* Effect.scoped(
|
|
274
|
+
* Effect.gen(function*() {
|
|
275
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
276
|
+
* yield* TxPubSub.publish(hub, "hello")
|
|
277
|
+
* const msg = yield* TxQueue.take(sub)
|
|
278
|
+
* console.log(msg) // "hello"
|
|
279
|
+
* })
|
|
280
|
+
* )
|
|
281
|
+
* })
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @since 4.0.0
|
|
285
|
+
* @category mutations
|
|
286
|
+
*/
|
|
287
|
+
export declare const publish: {
|
|
288
|
+
/**
|
|
289
|
+
* Publishes a message to all current subscribers.
|
|
290
|
+
*
|
|
291
|
+
* Returns `true` if the message was delivered to all subscribers, or `false` if
|
|
292
|
+
* the hub is shut down or the message was dropped for any subscriber (dropping strategy).
|
|
293
|
+
*
|
|
294
|
+
* For bounded strategy, retries the transaction if any subscriber queue is full.
|
|
295
|
+
* For sliding strategy, drops oldest messages in full subscriber queues.
|
|
296
|
+
* For dropping strategy, drops the message for full subscriber queues and returns `false`.
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```ts
|
|
300
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
301
|
+
*
|
|
302
|
+
* const program = Effect.gen(function*() {
|
|
303
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
304
|
+
*
|
|
305
|
+
* // No subscribers - publish is a no-op
|
|
306
|
+
* const r1 = yield* TxPubSub.publish(hub, "no one listening")
|
|
307
|
+
* console.log(r1) // true
|
|
308
|
+
*
|
|
309
|
+
* yield* Effect.scoped(
|
|
310
|
+
* Effect.gen(function*() {
|
|
311
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
312
|
+
* yield* TxPubSub.publish(hub, "hello")
|
|
313
|
+
* const msg = yield* TxQueue.take(sub)
|
|
314
|
+
* console.log(msg) // "hello"
|
|
315
|
+
* })
|
|
316
|
+
* )
|
|
317
|
+
* })
|
|
318
|
+
* ```
|
|
319
|
+
*
|
|
320
|
+
* @since 4.0.0
|
|
321
|
+
* @category mutations
|
|
322
|
+
*/
|
|
323
|
+
<A>(value: A): (self: TxPubSub<A>) => Effect.Effect<boolean>;
|
|
324
|
+
/**
|
|
325
|
+
* Publishes a message to all current subscribers.
|
|
326
|
+
*
|
|
327
|
+
* Returns `true` if the message was delivered to all subscribers, or `false` if
|
|
328
|
+
* the hub is shut down or the message was dropped for any subscriber (dropping strategy).
|
|
329
|
+
*
|
|
330
|
+
* For bounded strategy, retries the transaction if any subscriber queue is full.
|
|
331
|
+
* For sliding strategy, drops oldest messages in full subscriber queues.
|
|
332
|
+
* For dropping strategy, drops the message for full subscriber queues and returns `false`.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```ts
|
|
336
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
337
|
+
*
|
|
338
|
+
* const program = Effect.gen(function*() {
|
|
339
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
340
|
+
*
|
|
341
|
+
* // No subscribers - publish is a no-op
|
|
342
|
+
* const r1 = yield* TxPubSub.publish(hub, "no one listening")
|
|
343
|
+
* console.log(r1) // true
|
|
344
|
+
*
|
|
345
|
+
* yield* Effect.scoped(
|
|
346
|
+
* Effect.gen(function*() {
|
|
347
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
348
|
+
* yield* TxPubSub.publish(hub, "hello")
|
|
349
|
+
* const msg = yield* TxQueue.take(sub)
|
|
350
|
+
* console.log(msg) // "hello"
|
|
351
|
+
* })
|
|
352
|
+
* )
|
|
353
|
+
* })
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @since 4.0.0
|
|
357
|
+
* @category mutations
|
|
358
|
+
*/
|
|
359
|
+
<A>(self: TxPubSub<A>, value: A): Effect.Effect<boolean>;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Publishes all messages from an iterable to all current subscribers.
|
|
363
|
+
*
|
|
364
|
+
* Returns `true` if all messages were delivered to all subscribers.
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```ts
|
|
368
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
369
|
+
*
|
|
370
|
+
* const program = Effect.gen(function*() {
|
|
371
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
372
|
+
*
|
|
373
|
+
* yield* Effect.scoped(
|
|
374
|
+
* Effect.gen(function*() {
|
|
375
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
376
|
+
* yield* TxPubSub.publishAll(hub, [1, 2, 3])
|
|
377
|
+
* const v1 = yield* TxQueue.take(sub)
|
|
378
|
+
* const v2 = yield* TxQueue.take(sub)
|
|
379
|
+
* const v3 = yield* TxQueue.take(sub)
|
|
380
|
+
* console.log(v1, v2, v3) // 1 2 3
|
|
381
|
+
* })
|
|
382
|
+
* )
|
|
383
|
+
* })
|
|
384
|
+
* ```
|
|
385
|
+
*
|
|
386
|
+
* @since 4.0.0
|
|
387
|
+
* @category mutations
|
|
388
|
+
*/
|
|
389
|
+
export declare const publishAll: {
|
|
390
|
+
/**
|
|
391
|
+
* Publishes all messages from an iterable to all current subscribers.
|
|
392
|
+
*
|
|
393
|
+
* Returns `true` if all messages were delivered to all subscribers.
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```ts
|
|
397
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
398
|
+
*
|
|
399
|
+
* const program = Effect.gen(function*() {
|
|
400
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
401
|
+
*
|
|
402
|
+
* yield* Effect.scoped(
|
|
403
|
+
* Effect.gen(function*() {
|
|
404
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
405
|
+
* yield* TxPubSub.publishAll(hub, [1, 2, 3])
|
|
406
|
+
* const v1 = yield* TxQueue.take(sub)
|
|
407
|
+
* const v2 = yield* TxQueue.take(sub)
|
|
408
|
+
* const v3 = yield* TxQueue.take(sub)
|
|
409
|
+
* console.log(v1, v2, v3) // 1 2 3
|
|
410
|
+
* })
|
|
411
|
+
* )
|
|
412
|
+
* })
|
|
413
|
+
* ```
|
|
414
|
+
*
|
|
415
|
+
* @since 4.0.0
|
|
416
|
+
* @category mutations
|
|
417
|
+
*/
|
|
418
|
+
<A>(values: Iterable<A>): (self: TxPubSub<A>) => Effect.Effect<boolean>;
|
|
419
|
+
/**
|
|
420
|
+
* Publishes all messages from an iterable to all current subscribers.
|
|
421
|
+
*
|
|
422
|
+
* Returns `true` if all messages were delivered to all subscribers.
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* ```ts
|
|
426
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
427
|
+
*
|
|
428
|
+
* const program = Effect.gen(function*() {
|
|
429
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
430
|
+
*
|
|
431
|
+
* yield* Effect.scoped(
|
|
432
|
+
* Effect.gen(function*() {
|
|
433
|
+
* const sub = yield* TxPubSub.subscribe(hub)
|
|
434
|
+
* yield* TxPubSub.publishAll(hub, [1, 2, 3])
|
|
435
|
+
* const v1 = yield* TxQueue.take(sub)
|
|
436
|
+
* const v2 = yield* TxQueue.take(sub)
|
|
437
|
+
* const v3 = yield* TxQueue.take(sub)
|
|
438
|
+
* console.log(v1, v2, v3) // 1 2 3
|
|
439
|
+
* })
|
|
440
|
+
* )
|
|
441
|
+
* })
|
|
442
|
+
* ```
|
|
443
|
+
*
|
|
444
|
+
* @since 4.0.0
|
|
445
|
+
* @category mutations
|
|
446
|
+
*/
|
|
447
|
+
<A>(self: TxPubSub<A>, values: Iterable<A>): Effect.Effect<boolean>;
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Subscribes to the TxPubSub, returning a TxQueue that receives all messages
|
|
451
|
+
* published after subscription. The subscription is automatically removed when
|
|
452
|
+
* the scope is closed.
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* ```ts
|
|
456
|
+
* import { Effect, TxPubSub, TxQueue } from "effect"
|
|
457
|
+
*
|
|
458
|
+
* const program = Effect.gen(function*() {
|
|
459
|
+
* const hub = yield* TxPubSub.unbounded<string>()
|
|
460
|
+
*
|
|
461
|
+
* yield* Effect.scoped(
|
|
462
|
+
* Effect.gen(function*() {
|
|
463
|
+
* const sub1 = yield* TxPubSub.subscribe(hub)
|
|
464
|
+
* const sub2 = yield* TxPubSub.subscribe(hub)
|
|
465
|
+
*
|
|
466
|
+
* yield* TxPubSub.publish(hub, "broadcast")
|
|
467
|
+
*
|
|
468
|
+
* const msg1 = yield* TxQueue.take(sub1)
|
|
469
|
+
* const msg2 = yield* TxQueue.take(sub2)
|
|
470
|
+
* console.log(msg1, msg2) // "broadcast" "broadcast"
|
|
471
|
+
* })
|
|
472
|
+
* )
|
|
473
|
+
* })
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* @since 4.0.0
|
|
477
|
+
* @category mutations
|
|
478
|
+
*/
|
|
479
|
+
export declare const subscribe: <A>(self: TxPubSub<A>) => Effect.Effect<TxQueue.TxQueue<A>, never, Scope.Scope>;
|
|
480
|
+
/**
|
|
481
|
+
* Creates a subscriber queue and registers it with the pub/sub.
|
|
482
|
+
*
|
|
483
|
+
* This is the transactional acquire step of `subscribe`, exposed so that
|
|
484
|
+
* callers can compose it with other Tx operations in a single transaction
|
|
485
|
+
* (e.g. `TxSubscriptionRef.changes`).
|
|
486
|
+
*
|
|
487
|
+
* @since 4.0.0
|
|
488
|
+
* @category mutations
|
|
489
|
+
*/
|
|
490
|
+
export declare const acquireSubscriber: <A>(self: TxPubSub<A>) => Effect.Effect<TxQueue.TxQueue<A>, never, Effect.Transaction>;
|
|
491
|
+
/**
|
|
492
|
+
* Removes a subscriber queue from the pub/sub and shuts it down.
|
|
493
|
+
*
|
|
494
|
+
* This is the transactional release step of `subscribe`, exposed so that
|
|
495
|
+
* callers can compose it with other Tx operations in a single transaction.
|
|
496
|
+
*
|
|
497
|
+
* @since 4.0.0
|
|
498
|
+
* @category mutations
|
|
499
|
+
*/
|
|
500
|
+
export declare const releaseSubscriber: {
|
|
501
|
+
/**
|
|
502
|
+
* Removes a subscriber queue from the pub/sub and shuts it down.
|
|
503
|
+
*
|
|
504
|
+
* This is the transactional release step of `subscribe`, exposed so that
|
|
505
|
+
* callers can compose it with other Tx operations in a single transaction.
|
|
506
|
+
*
|
|
507
|
+
* @since 4.0.0
|
|
508
|
+
* @category mutations
|
|
509
|
+
*/
|
|
510
|
+
<A>(queue: TxQueue.TxQueue<A>): (self: TxPubSub<A>) => Effect.Effect<void, never, Effect.Transaction>;
|
|
511
|
+
/**
|
|
512
|
+
* Removes a subscriber queue from the pub/sub and shuts it down.
|
|
513
|
+
*
|
|
514
|
+
* This is the transactional release step of `subscribe`, exposed so that
|
|
515
|
+
* callers can compose it with other Tx operations in a single transaction.
|
|
516
|
+
*
|
|
517
|
+
* @since 4.0.0
|
|
518
|
+
* @category mutations
|
|
519
|
+
*/
|
|
520
|
+
<A>(self: TxPubSub<A>, queue: TxQueue.TxQueue<A>): Effect.Effect<void, never, Effect.Transaction>;
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* Shuts down the TxPubSub and all subscriber queues. Subsequent publish operations
|
|
524
|
+
* will return `false`. Subsequent subscribe operations will receive an already-shutdown queue.
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
* ```ts
|
|
528
|
+
* import { Effect, TxPubSub } from "effect"
|
|
529
|
+
*
|
|
530
|
+
* const program = Effect.gen(function*() {
|
|
531
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
532
|
+
* yield* TxPubSub.shutdown(hub)
|
|
533
|
+
*
|
|
534
|
+
* const shut = yield* TxPubSub.isShutdown(hub)
|
|
535
|
+
* console.log(shut) // true
|
|
536
|
+
*
|
|
537
|
+
* const accepted = yield* TxPubSub.publish(hub, 1)
|
|
538
|
+
* console.log(accepted) // false
|
|
539
|
+
* })
|
|
540
|
+
* ```
|
|
541
|
+
*
|
|
542
|
+
* @since 4.0.0
|
|
543
|
+
* @category mutations
|
|
544
|
+
*/
|
|
545
|
+
export declare const shutdown: <A>(self: TxPubSub<A>) => Effect.Effect<void, never, Effect.Transaction>;
|
|
546
|
+
/**
|
|
547
|
+
* Waits for the TxPubSub to be shut down.
|
|
548
|
+
*
|
|
549
|
+
* @example
|
|
550
|
+
* ```ts
|
|
551
|
+
* import { Effect, TxPubSub } from "effect"
|
|
552
|
+
*
|
|
553
|
+
* const program = Effect.gen(function*() {
|
|
554
|
+
* const hub = yield* TxPubSub.unbounded<number>()
|
|
555
|
+
*
|
|
556
|
+
* const fiber = yield* Effect.forkChild(TxPubSub.awaitShutdown(hub))
|
|
557
|
+
* yield* TxPubSub.shutdown(hub)
|
|
558
|
+
* yield* fiber.await
|
|
559
|
+
* })
|
|
560
|
+
* ```
|
|
561
|
+
*
|
|
562
|
+
* @since 4.0.0
|
|
563
|
+
* @category mutations
|
|
564
|
+
*/
|
|
565
|
+
export declare const awaitShutdown: <A>(self: TxPubSub<A>) => Effect.Effect<void, never, Effect.Transaction>;
|
|
566
|
+
/**
|
|
567
|
+
* Checks if the given value is a TxPubSub.
|
|
568
|
+
*
|
|
569
|
+
* @example
|
|
570
|
+
* ```ts
|
|
571
|
+
* import { TxPubSub } from "effect"
|
|
572
|
+
*
|
|
573
|
+
* declare const someValue: unknown
|
|
574
|
+
*
|
|
575
|
+
* if (TxPubSub.isTxPubSub(someValue)) {
|
|
576
|
+
* console.log("This is a TxPubSub")
|
|
577
|
+
* }
|
|
578
|
+
* ```
|
|
579
|
+
*
|
|
580
|
+
* @since 4.0.0
|
|
581
|
+
* @category guards
|
|
582
|
+
*/
|
|
583
|
+
export declare const isTxPubSub: (u: unknown) => u is TxPubSub<unknown>;
|
|
584
|
+
export {};
|
|
585
|
+
//# sourceMappingURL=TxPubSub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxPubSub.d.ts","sourceRoot":"","sources":["../src/TxPubSub.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAGvC,QAAA,MAAM,MAAM,kCAAkC,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,QAAQ,CAAC,EAAE,CAAC,GAAG,CAA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