@effect/cluster 0.50.6 → 0.52.0

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.
Files changed (232) hide show
  1. package/RunnerStorage/package.json +6 -0
  2. package/SqlRunnerStorage/package.json +6 -0
  3. package/dist/cjs/ClusterError.js +2 -24
  4. package/dist/cjs/ClusterError.js.map +1 -1
  5. package/dist/cjs/ClusterMetrics.js +13 -15
  6. package/dist/cjs/ClusterMetrics.js.map +1 -1
  7. package/dist/cjs/ClusterSchema.js +17 -2
  8. package/dist/cjs/ClusterSchema.js.map +1 -1
  9. package/dist/cjs/ClusterWorkflowEngine.js +50 -83
  10. package/dist/cjs/ClusterWorkflowEngine.js.map +1 -1
  11. package/dist/cjs/Entity.js +1 -13
  12. package/dist/cjs/Entity.js.map +1 -1
  13. package/dist/cjs/EntityAddress.js +9 -1
  14. package/dist/cjs/EntityAddress.js.map +1 -1
  15. package/dist/cjs/EntityId.js +7 -1
  16. package/dist/cjs/EntityId.js.map +1 -1
  17. package/dist/cjs/EntityProxy.js +1 -1
  18. package/dist/cjs/EntityProxy.js.map +1 -1
  19. package/dist/cjs/HttpRunner.js +69 -43
  20. package/dist/cjs/HttpRunner.js.map +1 -1
  21. package/dist/cjs/MessageStorage.js +64 -16
  22. package/dist/cjs/MessageStorage.js.map +1 -1
  23. package/dist/cjs/Runner.js +3 -3
  24. package/dist/cjs/Runner.js.map +1 -1
  25. package/dist/cjs/RunnerAddress.js +7 -0
  26. package/dist/cjs/RunnerAddress.js.map +1 -1
  27. package/dist/cjs/RunnerHealth.js +91 -32
  28. package/dist/cjs/RunnerHealth.js.map +1 -1
  29. package/dist/cjs/RunnerServer.js +38 -24
  30. package/dist/cjs/RunnerServer.js.map +1 -1
  31. package/dist/cjs/RunnerStorage.js +100 -0
  32. package/dist/cjs/RunnerStorage.js.map +1 -0
  33. package/dist/cjs/Runners.js +18 -22
  34. package/dist/cjs/Runners.js.map +1 -1
  35. package/dist/cjs/ShardId.js +17 -7
  36. package/dist/cjs/ShardId.js.map +1 -1
  37. package/dist/cjs/Sharding.js +444 -320
  38. package/dist/cjs/Sharding.js.map +1 -1
  39. package/dist/cjs/ShardingConfig.js +10 -14
  40. package/dist/cjs/ShardingConfig.js.map +1 -1
  41. package/dist/cjs/Snowflake.js +1 -1
  42. package/dist/cjs/SocketRunner.js +1 -1
  43. package/dist/cjs/SocketRunner.js.map +1 -1
  44. package/dist/cjs/SqlMessageStorage.js +22 -28
  45. package/dist/cjs/SqlMessageStorage.js.map +1 -1
  46. package/dist/cjs/SqlRunnerStorage.js +375 -0
  47. package/dist/cjs/SqlRunnerStorage.js.map +1 -0
  48. package/dist/cjs/index.js +5 -15
  49. package/dist/cjs/internal/entityManager.js +42 -23
  50. package/dist/cjs/internal/entityManager.js.map +1 -1
  51. package/dist/dts/ClusterError.d.ts +0 -22
  52. package/dist/dts/ClusterError.d.ts.map +1 -1
  53. package/dist/dts/ClusterMetrics.d.ts +4 -14
  54. package/dist/dts/ClusterMetrics.d.ts.map +1 -1
  55. package/dist/dts/ClusterSchema.d.ts +9 -1
  56. package/dist/dts/ClusterSchema.d.ts.map +1 -1
  57. package/dist/dts/ClusterWorkflowEngine.d.ts.map +1 -1
  58. package/dist/dts/Entity.d.ts +3 -14
  59. package/dist/dts/Entity.d.ts.map +1 -1
  60. package/dist/dts/EntityAddress.d.ts +11 -0
  61. package/dist/dts/EntityAddress.d.ts.map +1 -1
  62. package/dist/dts/EntityId.d.ts +5 -0
  63. package/dist/dts/EntityId.d.ts.map +1 -1
  64. package/dist/dts/EntityProxy.d.ts +5 -6
  65. package/dist/dts/EntityProxy.d.ts.map +1 -1
  66. package/dist/dts/HttpRunner.d.ts +48 -25
  67. package/dist/dts/HttpRunner.d.ts.map +1 -1
  68. package/dist/dts/MessageStorage.d.ts +13 -5
  69. package/dist/dts/MessageStorage.d.ts.map +1 -1
  70. package/dist/dts/Runner.d.ts +4 -4
  71. package/dist/dts/Runner.d.ts.map +1 -1
  72. package/dist/dts/RunnerAddress.d.ts +5 -0
  73. package/dist/dts/RunnerAddress.d.ts.map +1 -1
  74. package/dist/dts/RunnerHealth.d.ts +24 -16
  75. package/dist/dts/RunnerHealth.d.ts.map +1 -1
  76. package/dist/dts/RunnerServer.d.ts +5 -4
  77. package/dist/dts/RunnerServer.d.ts.map +1 -1
  78. package/dist/dts/{ShardStorage.d.ts → RunnerStorage.d.ts} +41 -54
  79. package/dist/dts/RunnerStorage.d.ts.map +1 -0
  80. package/dist/dts/Runners.d.ts +15 -11
  81. package/dist/dts/Runners.d.ts.map +1 -1
  82. package/dist/dts/ShardId.d.ts +1 -1
  83. package/dist/dts/ShardId.d.ts.map +1 -1
  84. package/dist/dts/Sharding.d.ts +20 -10
  85. package/dist/dts/Sharding.d.ts.map +1 -1
  86. package/dist/dts/ShardingConfig.d.ts +40 -14
  87. package/dist/dts/ShardingConfig.d.ts.map +1 -1
  88. package/dist/dts/SocketRunner.d.ts +4 -3
  89. package/dist/dts/SocketRunner.d.ts.map +1 -1
  90. package/dist/dts/SqlMessageStorage.d.ts +2 -3
  91. package/dist/dts/SqlMessageStorage.d.ts.map +1 -1
  92. package/dist/dts/SqlRunnerStorage.d.ts +40 -0
  93. package/dist/dts/SqlRunnerStorage.d.ts.map +1 -0
  94. package/dist/dts/index.d.ts +4 -24
  95. package/dist/dts/index.d.ts.map +1 -1
  96. package/dist/esm/ClusterError.js +0 -21
  97. package/dist/esm/ClusterError.js.map +1 -1
  98. package/dist/esm/ClusterMetrics.js +12 -14
  99. package/dist/esm/ClusterMetrics.js.map +1 -1
  100. package/dist/esm/ClusterSchema.js +17 -2
  101. package/dist/esm/ClusterSchema.js.map +1 -1
  102. package/dist/esm/ClusterWorkflowEngine.js +50 -83
  103. package/dist/esm/ClusterWorkflowEngine.js.map +1 -1
  104. package/dist/esm/Entity.js +0 -12
  105. package/dist/esm/Entity.js.map +1 -1
  106. package/dist/esm/EntityAddress.js +7 -0
  107. package/dist/esm/EntityAddress.js.map +1 -1
  108. package/dist/esm/EntityId.js +5 -0
  109. package/dist/esm/EntityId.js.map +1 -1
  110. package/dist/esm/EntityProxy.js +2 -2
  111. package/dist/esm/EntityProxy.js.map +1 -1
  112. package/dist/esm/HttpRunner.js +62 -39
  113. package/dist/esm/HttpRunner.js.map +1 -1
  114. package/dist/esm/MessageStorage.js +65 -17
  115. package/dist/esm/MessageStorage.js.map +1 -1
  116. package/dist/esm/Runner.js +3 -3
  117. package/dist/esm/Runner.js.map +1 -1
  118. package/dist/esm/RunnerAddress.js +7 -0
  119. package/dist/esm/RunnerAddress.js.map +1 -1
  120. package/dist/esm/RunnerHealth.js +88 -30
  121. package/dist/esm/RunnerHealth.js.map +1 -1
  122. package/dist/esm/RunnerServer.js +38 -24
  123. package/dist/esm/RunnerServer.js.map +1 -1
  124. package/dist/esm/RunnerStorage.js +90 -0
  125. package/dist/esm/RunnerStorage.js.map +1 -0
  126. package/dist/esm/Runners.js +19 -23
  127. package/dist/esm/Runners.js.map +1 -1
  128. package/dist/esm/ShardId.js +16 -6
  129. package/dist/esm/ShardId.js.map +1 -1
  130. package/dist/esm/Sharding.js +447 -323
  131. package/dist/esm/Sharding.js.map +1 -1
  132. package/dist/esm/ShardingConfig.js +10 -14
  133. package/dist/esm/ShardingConfig.js.map +1 -1
  134. package/dist/esm/Snowflake.js +1 -1
  135. package/dist/esm/SocketRunner.js +1 -1
  136. package/dist/esm/SocketRunner.js.map +1 -1
  137. package/dist/esm/SqlMessageStorage.js +22 -28
  138. package/dist/esm/SqlMessageStorage.js.map +1 -1
  139. package/dist/esm/SqlRunnerStorage.js +366 -0
  140. package/dist/esm/SqlRunnerStorage.js.map +1 -0
  141. package/dist/esm/index.js +4 -24
  142. package/dist/esm/index.js.map +1 -1
  143. package/dist/esm/internal/entityManager.js +41 -22
  144. package/dist/esm/internal/entityManager.js.map +1 -1
  145. package/package.json +20 -60
  146. package/src/ClusterError.ts +0 -24
  147. package/src/ClusterMetrics.ts +12 -16
  148. package/src/ClusterSchema.ts +17 -2
  149. package/src/ClusterWorkflowEngine.ts +48 -80
  150. package/src/Entity.ts +3 -21
  151. package/src/EntityAddress.ts +10 -0
  152. package/src/EntityId.ts +6 -0
  153. package/src/EntityProxy.ts +10 -10
  154. package/src/HttpRunner.ts +132 -67
  155. package/src/MessageStorage.ts +89 -24
  156. package/src/Runner.ts +4 -4
  157. package/src/RunnerAddress.ts +8 -0
  158. package/src/RunnerHealth.ts +119 -56
  159. package/src/RunnerServer.ts +64 -47
  160. package/src/RunnerStorage.ts +218 -0
  161. package/src/Runners.ts +32 -45
  162. package/src/ShardId.ts +14 -3
  163. package/src/Sharding.ts +561 -417
  164. package/src/ShardingConfig.ts +39 -31
  165. package/src/Snowflake.ts +1 -1
  166. package/src/SocketRunner.ts +6 -4
  167. package/src/SqlMessageStorage.ts +28 -30
  168. package/src/SqlRunnerStorage.ts +537 -0
  169. package/src/index.ts +4 -29
  170. package/src/internal/entityManager.ts +45 -29
  171. package/HttpCommon/package.json +0 -6
  172. package/HttpShardManager/package.json +0 -6
  173. package/ShardManager/package.json +0 -6
  174. package/ShardStorage/package.json +0 -6
  175. package/SocketShardManager/package.json +0 -6
  176. package/SqlShardStorage/package.json +0 -6
  177. package/SynchronizedClock/package.json +0 -6
  178. package/dist/cjs/HttpCommon.js +0 -48
  179. package/dist/cjs/HttpCommon.js.map +0 -1
  180. package/dist/cjs/HttpShardManager.js +0 -139
  181. package/dist/cjs/HttpShardManager.js.map +0 -1
  182. package/dist/cjs/ShardManager.js +0 -549
  183. package/dist/cjs/ShardManager.js.map +0 -1
  184. package/dist/cjs/ShardStorage.js +0 -151
  185. package/dist/cjs/ShardStorage.js.map +0 -1
  186. package/dist/cjs/SocketShardManager.js +0 -32
  187. package/dist/cjs/SocketShardManager.js.map +0 -1
  188. package/dist/cjs/SqlShardStorage.js +0 -253
  189. package/dist/cjs/SqlShardStorage.js.map +0 -1
  190. package/dist/cjs/SynchronizedClock.js +0 -65
  191. package/dist/cjs/SynchronizedClock.js.map +0 -1
  192. package/dist/cjs/internal/shardManager.js +0 -353
  193. package/dist/cjs/internal/shardManager.js.map +0 -1
  194. package/dist/dts/HttpCommon.d.ts +0 -25
  195. package/dist/dts/HttpCommon.d.ts.map +0 -1
  196. package/dist/dts/HttpShardManager.d.ts +0 -119
  197. package/dist/dts/HttpShardManager.d.ts.map +0 -1
  198. package/dist/dts/ShardManager.d.ts +0 -459
  199. package/dist/dts/ShardManager.d.ts.map +0 -1
  200. package/dist/dts/ShardStorage.d.ts.map +0 -1
  201. package/dist/dts/SocketShardManager.d.ts +0 -17
  202. package/dist/dts/SocketShardManager.d.ts.map +0 -1
  203. package/dist/dts/SqlShardStorage.d.ts +0 -38
  204. package/dist/dts/SqlShardStorage.d.ts.map +0 -1
  205. package/dist/dts/SynchronizedClock.d.ts +0 -19
  206. package/dist/dts/SynchronizedClock.d.ts.map +0 -1
  207. package/dist/dts/internal/shardManager.d.ts +0 -2
  208. package/dist/dts/internal/shardManager.d.ts.map +0 -1
  209. package/dist/esm/HttpCommon.js +0 -38
  210. package/dist/esm/HttpCommon.js.map +0 -1
  211. package/dist/esm/HttpShardManager.js +0 -128
  212. package/dist/esm/HttpShardManager.js.map +0 -1
  213. package/dist/esm/ShardManager.js +0 -535
  214. package/dist/esm/ShardManager.js.map +0 -1
  215. package/dist/esm/ShardStorage.js +0 -141
  216. package/dist/esm/ShardStorage.js.map +0 -1
  217. package/dist/esm/SocketShardManager.js +0 -24
  218. package/dist/esm/SocketShardManager.js.map +0 -1
  219. package/dist/esm/SqlShardStorage.js +0 -244
  220. package/dist/esm/SqlShardStorage.js.map +0 -1
  221. package/dist/esm/SynchronizedClock.js +0 -57
  222. package/dist/esm/SynchronizedClock.js.map +0 -1
  223. package/dist/esm/internal/shardManager.js +0 -342
  224. package/dist/esm/internal/shardManager.js.map +0 -1
  225. package/src/HttpCommon.ts +0 -73
  226. package/src/HttpShardManager.ts +0 -273
  227. package/src/ShardManager.ts +0 -823
  228. package/src/ShardStorage.ts +0 -297
  229. package/src/SocketShardManager.ts +0 -48
  230. package/src/SqlShardStorage.ts +0 -329
  231. package/src/SynchronizedClock.ts +0 -82
  232. package/src/internal/shardManager.ts +0 -412
@@ -1,459 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import * as Rpc from "@effect/rpc/Rpc";
5
- import * as RpcClient from "@effect/rpc/RpcClient";
6
- import * as RpcGroup from "@effect/rpc/RpcGroup";
7
- import * as RpcServer from "@effect/rpc/RpcServer";
8
- import * as Config_ from "effect/Config";
9
- import type { ConfigError } from "effect/ConfigError";
10
- import * as Context from "effect/Context";
11
- import * as Data from "effect/Data";
12
- import * as Duration from "effect/Duration";
13
- import * as Effect from "effect/Effect";
14
- import * as Layer from "effect/Layer";
15
- import * as Mailbox from "effect/Mailbox";
16
- import * as Option from "effect/Option";
17
- import * as Queue from "effect/Queue";
18
- import * as Schema from "effect/Schema";
19
- import type { Scope } from "effect/Scope";
20
- import { RunnerNotRegistered } from "./ClusterError.js";
21
- import * as MachineId from "./MachineId.js";
22
- import { Runner } from "./Runner.js";
23
- import { RunnerAddress } from "./RunnerAddress.js";
24
- import { RunnerHealth } from "./RunnerHealth.js";
25
- import { RpcClientProtocol, Runners } from "./Runners.js";
26
- import { ShardId } from "./ShardId.js";
27
- import { ShardingConfig } from "./ShardingConfig.js";
28
- import { ShardStorage } from "./ShardStorage.js";
29
- declare const ShardManager_base: Context.TagClass<ShardManager, "@effect/cluster/ShardManager", {
30
- /**
31
- * Get all shard assignments.
32
- */
33
- readonly getAssignments: Effect.Effect<Iterable<readonly [ShardId, Option.Option<RunnerAddress>]>>;
34
- /**
35
- * Get a stream of sharding events emit by the shard manager.
36
- */
37
- readonly shardingEvents: (address: Option.Option<RunnerAddress>) => Effect.Effect<Queue.Dequeue<ShardingEvent>, RunnerNotRegistered, Scope>;
38
- /**
39
- * Register a new runner with the cluster.
40
- */
41
- readonly register: (runner: Runner) => Effect.Effect<MachineId.MachineId>;
42
- /**
43
- * Unregister a runner from the cluster.
44
- */
45
- readonly unregister: (address: RunnerAddress) => Effect.Effect<void>;
46
- /**
47
- * Rebalance shards assigned to runners within the cluster.
48
- */
49
- readonly rebalance: Effect.Effect<void>;
50
- /**
51
- * Notify the cluster of an unhealthy runner.
52
- */
53
- readonly notifyUnhealthyRunner: (address: RunnerAddress) => Effect.Effect<void>;
54
- /**
55
- * Check and repot on the health of all runners in the cluster.
56
- */
57
- readonly checkRunnerHealth: Effect.Effect<void>;
58
- }>;
59
- /**
60
- * @since 1.0.0
61
- * @category models
62
- */
63
- export declare class ShardManager extends ShardManager_base {
64
- }
65
- declare const Config_base: Context.TagClass<Config, "@effect/cluster/ShardManager/Config", {
66
- /**
67
- * The duration to wait before rebalancing shards after a change.
68
- */
69
- readonly rebalanceDebounce: Duration.DurationInput;
70
- /**
71
- * The interval on which regular rebalancing of shards will occur.
72
- */
73
- readonly rebalanceInterval: Duration.DurationInput;
74
- /**
75
- * The interval on which rebalancing of shards which failed to be
76
- * rebalanced will be retried.
77
- */
78
- readonly rebalanceRetryInterval: Duration.DurationInput;
79
- /**
80
- * The maximum ratio of shards to rebalance at once.
81
- *
82
- * **Note**: this value should be a number between `0` and `1`.
83
- */
84
- readonly rebalanceRate: number;
85
- /**
86
- * The interval on which persistence of Runners will be retried if it fails.
87
- */
88
- readonly persistRetryInterval: Duration.DurationInput;
89
- /**
90
- * The number of times persistence of Runners will be retried if it fails.
91
- */
92
- readonly persistRetryCount: number;
93
- /**
94
- * The interval on which Runner health will be checked.
95
- */
96
- readonly runnerHealthCheckInterval: Duration.DurationInput;
97
- /**
98
- * The length of time to wait for a Runner to respond to a ping.
99
- */
100
- readonly runnerPingTimeout: Duration.DurationInput;
101
- }>;
102
- /**
103
- * @since 1.0.0
104
- * @category Config
105
- */
106
- export declare class Config extends Config_base {
107
- /**
108
- * @since 1.0.0
109
- */
110
- static readonly defaults: Config["Type"];
111
- }
112
- /**
113
- * @since 1.0.0
114
- * @category Config
115
- */
116
- export declare const configConfig: Config_.Config<Config["Type"]>;
117
- /**
118
- * @since 1.0.0
119
- * @category Config
120
- */
121
- export declare const configFromEnv: Effect.Effect<Config["Type"], ConfigError>;
122
- /**
123
- * @since 1.0.0
124
- * @category Config
125
- */
126
- export declare const layerConfig: (config?: Partial<Config["Type"]> | undefined) => Layer.Layer<Config>;
127
- /**
128
- * @since 1.0.0
129
- * @category Config
130
- */
131
- export declare const layerConfigFromEnv: (config?: Partial<Config["Type"]> | undefined) => Layer.Layer<Config, ConfigError>;
132
- declare const ShardManagerClient_base: Context.TagClass<ShardManagerClient, "@effect/cluster/ShardManager/ShardManagerClient", {
133
- /**
134
- * Register a new runner with the cluster.
135
- */
136
- readonly register: (address: RunnerAddress, groups: ReadonlyArray<string>) => Effect.Effect<MachineId.MachineId>;
137
- /**
138
- * Unregister a runner from the cluster.
139
- */
140
- readonly unregister: (address: RunnerAddress) => Effect.Effect<void>;
141
- /**
142
- * Notify the cluster of an unhealthy runner.
143
- */
144
- readonly notifyUnhealthyRunner: (address: RunnerAddress) => Effect.Effect<void>;
145
- /**
146
- * Get all shard assignments.
147
- */
148
- readonly getAssignments: Effect.Effect<Iterable<readonly [ShardId, Option.Option<RunnerAddress>]>>;
149
- /**
150
- * Get a stream of sharding events emit by the shard manager.
151
- */
152
- readonly shardingEvents: (address: Option.Option<RunnerAddress>) => Effect.Effect<Mailbox.ReadonlyMailbox<ShardingEvent>, never, Scope>;
153
- /**
154
- * Get the current time on the shard manager.
155
- */
156
- readonly getTime: Effect.Effect<number>;
157
- }>;
158
- /**
159
- * Represents a client which can be used to communicate with the
160
- * `ShardManager`.
161
- *
162
- * @since 1.0.0
163
- * @category Client
164
- */
165
- export declare class ShardManagerClient extends ShardManagerClient_base {
166
- }
167
- /**
168
- * @since 1.0.0
169
- * @category models
170
- */
171
- export declare const ShardingEventSchema: Schema.Union<[Schema.TaggedStruct<"StreamStarted", {}>, Schema.TaggedStruct<"ShardsAssigned", {
172
- address: typeof RunnerAddress;
173
- shards: Schema.Array$<typeof ShardId>;
174
- }>, Schema.TaggedStruct<"ShardsUnassigned", {
175
- address: typeof RunnerAddress;
176
- shards: Schema.Array$<typeof ShardId>;
177
- }>, Schema.TaggedStruct<"RunnerRegistered", {
178
- address: typeof RunnerAddress;
179
- }>, Schema.TaggedStruct<"RunnerUnregistered", {
180
- address: typeof RunnerAddress;
181
- }>]>;
182
- declare const Rpcs_base: RpcGroup.RpcGroup<Rpc.Rpc<"Register", Schema.Struct<{
183
- runner: typeof Runner;
184
- }>, Schema.brand<typeof Schema.Int, "MachineId">, typeof Schema.Never, never> | Rpc.Rpc<"Unregister", Schema.Struct<{
185
- address: typeof RunnerAddress;
186
- }>, typeof Schema.Void, typeof Schema.Never, never> | Rpc.Rpc<"NotifyUnhealthyRunner", Schema.Struct<{
187
- address: typeof RunnerAddress;
188
- }>, typeof Schema.Void, typeof Schema.Never, never> | Rpc.Rpc<"GetAssignments", typeof Schema.Void, Schema.Array$<Schema.Tuple2<typeof ShardId, Schema.Option<typeof RunnerAddress>>>, typeof Schema.Never, never> | Rpc.Rpc<"ShardingEvents", Schema.Struct<{
189
- address: Schema.Option<typeof RunnerAddress>;
190
- }>, import("@effect/rpc/RpcSchema").Stream<Schema.Union<[Schema.TaggedStruct<"StreamStarted", {}>, Schema.TaggedStruct<"ShardsAssigned", {
191
- address: typeof RunnerAddress;
192
- shards: Schema.Array$<typeof ShardId>;
193
- }>, Schema.TaggedStruct<"ShardsUnassigned", {
194
- address: typeof RunnerAddress;
195
- shards: Schema.Array$<typeof ShardId>;
196
- }>, Schema.TaggedStruct<"RunnerRegistered", {
197
- address: typeof RunnerAddress;
198
- }>, Schema.TaggedStruct<"RunnerUnregistered", {
199
- address: typeof RunnerAddress;
200
- }>]>, typeof RunnerNotRegistered>, typeof Schema.Never, never> | Rpc.Rpc<"GetTime", typeof Schema.Void, typeof Schema.Number, typeof Schema.Never, never>>;
201
- /**
202
- * The messaging protocol for the `ShardManager`.
203
- *
204
- * @since 1.0.0
205
- * @category Rpcs
206
- */
207
- export declare class Rpcs extends Rpcs_base {
208
- }
209
- /**
210
- * @since 1.0.0
211
- * @category models
212
- */
213
- export type ShardingEvent = Data.TaggedEnum<{
214
- StreamStarted: {};
215
- ShardsAssigned: {
216
- address: RunnerAddress;
217
- shards: ReadonlyArray<ShardId>;
218
- };
219
- ShardsUnassigned: {
220
- address: RunnerAddress;
221
- shards: ReadonlyArray<ShardId>;
222
- };
223
- RunnerRegistered: {
224
- address: RunnerAddress;
225
- };
226
- RunnerUnregistered: {
227
- address: RunnerAddress;
228
- };
229
- }>;
230
- /**
231
- * @since 1.0.0
232
- * @category models
233
- */
234
- export declare const ShardingEvent: {
235
- readonly StreamStarted: Data.Case.Constructor<{
236
- readonly _tag: "StreamStarted";
237
- }, "_tag">;
238
- readonly ShardsAssigned: Data.Case.Constructor<{
239
- readonly _tag: "ShardsAssigned";
240
- readonly address: RunnerAddress;
241
- readonly shards: ReadonlyArray<ShardId>;
242
- }, "_tag">;
243
- readonly ShardsUnassigned: Data.Case.Constructor<{
244
- readonly _tag: "ShardsUnassigned";
245
- readonly address: RunnerAddress;
246
- readonly shards: ReadonlyArray<ShardId>;
247
- }, "_tag">;
248
- readonly RunnerRegistered: Data.Case.Constructor<{
249
- readonly _tag: "RunnerRegistered";
250
- readonly address: RunnerAddress;
251
- }, "_tag">;
252
- readonly RunnerUnregistered: Data.Case.Constructor<{
253
- readonly _tag: "RunnerUnregistered";
254
- readonly address: RunnerAddress;
255
- }, "_tag">;
256
- readonly $is: <Tag extends "StreamStarted" | "ShardsAssigned" | "ShardsUnassigned" | "RunnerRegistered" | "RunnerUnregistered">(tag: Tag) => (u: unknown) => u is Extract<{
257
- readonly _tag: "StreamStarted";
258
- }, {
259
- readonly _tag: Tag;
260
- }> | Extract<{
261
- readonly _tag: "ShardsAssigned";
262
- readonly address: RunnerAddress;
263
- readonly shards: ReadonlyArray<ShardId>;
264
- }, {
265
- readonly _tag: Tag;
266
- }> | Extract<{
267
- readonly _tag: "ShardsUnassigned";
268
- readonly address: RunnerAddress;
269
- readonly shards: ReadonlyArray<ShardId>;
270
- }, {
271
- readonly _tag: Tag;
272
- }> | Extract<{
273
- readonly _tag: "RunnerRegistered";
274
- readonly address: RunnerAddress;
275
- }, {
276
- readonly _tag: Tag;
277
- }> | Extract<{
278
- readonly _tag: "RunnerUnregistered";
279
- readonly address: RunnerAddress;
280
- }, {
281
- readonly _tag: Tag;
282
- }>;
283
- readonly $match: {
284
- <const Cases extends {
285
- readonly StreamStarted: (args: {
286
- readonly _tag: "StreamStarted";
287
- }) => any;
288
- readonly ShardsAssigned: (args: {
289
- readonly _tag: "ShardsAssigned";
290
- readonly address: RunnerAddress;
291
- readonly shards: ReadonlyArray<ShardId>;
292
- }) => any;
293
- readonly ShardsUnassigned: (args: {
294
- readonly _tag: "ShardsUnassigned";
295
- readonly address: RunnerAddress;
296
- readonly shards: ReadonlyArray<ShardId>;
297
- }) => any;
298
- readonly RunnerRegistered: (args: {
299
- readonly _tag: "RunnerRegistered";
300
- readonly address: RunnerAddress;
301
- }) => any;
302
- readonly RunnerUnregistered: (args: {
303
- readonly _tag: "RunnerUnregistered";
304
- readonly address: RunnerAddress;
305
- }) => any;
306
- }>(cases: Cases & { [K in Exclude<keyof Cases, "StreamStarted" | "ShardsAssigned" | "ShardsUnassigned" | "RunnerRegistered" | "RunnerUnregistered">]: never; }): (value: {
307
- readonly _tag: "StreamStarted";
308
- } | {
309
- readonly _tag: "ShardsAssigned";
310
- readonly address: RunnerAddress;
311
- readonly shards: ReadonlyArray<ShardId>;
312
- } | {
313
- readonly _tag: "ShardsUnassigned";
314
- readonly address: RunnerAddress;
315
- readonly shards: ReadonlyArray<ShardId>;
316
- } | {
317
- readonly _tag: "RunnerRegistered";
318
- readonly address: RunnerAddress;
319
- } | {
320
- readonly _tag: "RunnerUnregistered";
321
- readonly address: RunnerAddress;
322
- }) => import("effect/Unify").Unify<ReturnType<Cases["StreamStarted" | "ShardsAssigned" | "ShardsUnassigned" | "RunnerRegistered" | "RunnerUnregistered"]>>;
323
- <const Cases extends {
324
- readonly StreamStarted: (args: {
325
- readonly _tag: "StreamStarted";
326
- }) => any;
327
- readonly ShardsAssigned: (args: {
328
- readonly _tag: "ShardsAssigned";
329
- readonly address: RunnerAddress;
330
- readonly shards: ReadonlyArray<ShardId>;
331
- }) => any;
332
- readonly ShardsUnassigned: (args: {
333
- readonly _tag: "ShardsUnassigned";
334
- readonly address: RunnerAddress;
335
- readonly shards: ReadonlyArray<ShardId>;
336
- }) => any;
337
- readonly RunnerRegistered: (args: {
338
- readonly _tag: "RunnerRegistered";
339
- readonly address: RunnerAddress;
340
- }) => any;
341
- readonly RunnerUnregistered: (args: {
342
- readonly _tag: "RunnerUnregistered";
343
- readonly address: RunnerAddress;
344
- }) => any;
345
- }>(value: {
346
- readonly _tag: "StreamStarted";
347
- } | {
348
- readonly _tag: "ShardsAssigned";
349
- readonly address: RunnerAddress;
350
- readonly shards: ReadonlyArray<ShardId>;
351
- } | {
352
- readonly _tag: "ShardsUnassigned";
353
- readonly address: RunnerAddress;
354
- readonly shards: ReadonlyArray<ShardId>;
355
- } | {
356
- readonly _tag: "RunnerRegistered";
357
- readonly address: RunnerAddress;
358
- } | {
359
- readonly _tag: "RunnerUnregistered";
360
- readonly address: RunnerAddress;
361
- }, cases: Cases & { [K in Exclude<keyof Cases, "StreamStarted" | "ShardsAssigned" | "ShardsUnassigned" | "RunnerRegistered" | "RunnerUnregistered">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["StreamStarted" | "ShardsAssigned" | "ShardsUnassigned" | "RunnerRegistered" | "RunnerUnregistered"]>>;
362
- };
363
- };
364
- /**
365
- * @since 1.0.0
366
- * @category Client
367
- */
368
- export declare const makeClientLocal: Effect.Effect<{
369
- /**
370
- * Register a new runner with the cluster.
371
- */
372
- readonly register: (address: RunnerAddress, groups: ReadonlyArray<string>) => Effect.Effect<MachineId.MachineId>;
373
- /**
374
- * Unregister a runner from the cluster.
375
- */
376
- readonly unregister: (address: RunnerAddress) => Effect.Effect<void>;
377
- /**
378
- * Notify the cluster of an unhealthy runner.
379
- */
380
- readonly notifyUnhealthyRunner: (address: RunnerAddress) => Effect.Effect<void>;
381
- /**
382
- * Get all shard assignments.
383
- */
384
- readonly getAssignments: Effect.Effect<Iterable<readonly [ShardId, Option.Option<RunnerAddress>]>>;
385
- /**
386
- * Get a stream of sharding events emit by the shard manager.
387
- */
388
- readonly shardingEvents: (address: Option.Option<RunnerAddress>) => Effect.Effect<Mailbox.ReadonlyMailbox<ShardingEvent>, never, Scope>;
389
- /**
390
- * Get the current time on the shard manager.
391
- */
392
- readonly getTime: Effect.Effect<number>;
393
- }, never, ShardingConfig>;
394
- /**
395
- * @since 1.0.0
396
- * @category Client
397
- */
398
- export declare const makeClientRpc: Effect.Effect<ShardManagerClient["Type"], never, ShardingConfig | RpcClient.Protocol | Scope>;
399
- /**
400
- * @since 1.0.0
401
- * @category Client
402
- */
403
- export declare const layerClientLocal: Layer.Layer<ShardManagerClient, never, ShardingConfig>;
404
- /**
405
- * @since 1.0.0
406
- * @category Client
407
- */
408
- export declare const layerClientRpc: Layer.Layer<ShardManagerClient, never, ShardingConfig | RpcClientProtocol>;
409
- /**
410
- * @since 1.0.0
411
- * @category Constructors
412
- */
413
- export declare const make: Effect.Effect<{
414
- /**
415
- * Get all shard assignments.
416
- */
417
- readonly getAssignments: Effect.Effect<Iterable<readonly [ShardId, Option.Option<RunnerAddress>]>>;
418
- /**
419
- * Get a stream of sharding events emit by the shard manager.
420
- */
421
- readonly shardingEvents: (address: Option.Option<RunnerAddress>) => Effect.Effect<Queue.Dequeue<ShardingEvent>, RunnerNotRegistered, Scope>;
422
- /**
423
- * Register a new runner with the cluster.
424
- */
425
- readonly register: (runner: Runner) => Effect.Effect<MachineId.MachineId>;
426
- /**
427
- * Unregister a runner from the cluster.
428
- */
429
- readonly unregister: (address: RunnerAddress) => Effect.Effect<void>;
430
- /**
431
- * Rebalance shards assigned to runners within the cluster.
432
- */
433
- readonly rebalance: Effect.Effect<void>;
434
- /**
435
- * Notify the cluster of an unhealthy runner.
436
- */
437
- readonly notifyUnhealthyRunner: (address: RunnerAddress) => Effect.Effect<void>;
438
- /**
439
- * Check and repot on the health of all runners in the cluster.
440
- */
441
- readonly checkRunnerHealth: Effect.Effect<void>;
442
- }, never, Scope | ShardingConfig | Runners | RunnerHealth | ShardStorage | Config>;
443
- /**
444
- * @since 1.0.0
445
- * @category layer
446
- */
447
- export declare const layer: Layer.Layer<ShardManager, never, ShardStorage | RunnerHealth | Runners | Config | ShardingConfig>;
448
- /**
449
- * @since 1.0.0
450
- * @category Server
451
- */
452
- export declare const layerServerHandlers: Layer.Layer<Rpc.Handler<"Register"> | Rpc.Handler<"Unregister"> | Rpc.Handler<"NotifyUnhealthyRunner"> | Rpc.Handler<"GetAssignments"> | Rpc.Handler<"ShardingEvents"> | Rpc.Handler<"GetTime">, never, ShardManager>;
453
- /**
454
- * @since 1.0.0
455
- * @category Server
456
- */
457
- export declare const layerServer: Layer.Layer<never, never, ShardManager | RpcServer.Protocol>;
458
- export {};
459
- //# sourceMappingURL=ShardManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ShardManager.d.ts","sourceRoot":"","sources":["../../src/ShardManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAGlD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AAEnC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAA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,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAEpD;;OAEG;sBACe,CAChB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,KACb,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAE1C;;OAEG;yBACkB,CAAC,OAAO,EAAE,aAAa,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC;gBAwMtF,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAA0C,CAAA"}
@@ -1,17 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import { SocketServer } from "@effect/platform/SocketServer";
5
- import type { RpcSerialization } from "@effect/rpc/RpcSerialization";
6
- import * as Layer from "effect/Layer";
7
- import type { RunnerHealth } from "./RunnerHealth.js";
8
- import * as Runners from "./Runners.js";
9
- import type { ShardingConfig } from "./ShardingConfig.js";
10
- import * as ShardManager from "./ShardManager.js";
11
- import type { ShardStorage } from "./ShardStorage.js";
12
- /**
13
- * @since 1.0.0
14
- * @category Layers
15
- */
16
- export declare const layer: Layer.Layer<ShardManager.ShardManager, never, ShardStorage | SocketServer | Runners.RpcClientProtocol | RpcSerialization | RunnerHealth | ShardManager.Config | ShardingConfig>;
17
- //# sourceMappingURL=SocketShardManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SocketShardManager.d.ts","sourceRoot":"","sources":["../../src/SocketShardManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAcrD;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAC7B,YAAY,CAAC,YAAY,EACzB,KAAK,EACH,YAAY,GACZ,YAAY,GACZ,OAAO,CAAC,iBAAiB,GACzB,gBAAgB,GAChB,YAAY,GACZ,YAAY,CAAC,MAAM,GACnB,cAAc,CAOjB,CAAA"}
@@ -1,38 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import * as SqlClient from "@effect/sql/SqlClient";
5
- import type { SqlError } from "@effect/sql/SqlError";
6
- import * as Effect from "effect/Effect";
7
- import * as Layer from "effect/Layer";
8
- import { PersistenceError } from "./ClusterError.js";
9
- import * as ShardStorage from "./ShardStorage.js";
10
- /**
11
- * @since 1.0.0
12
- * @category Constructors
13
- */
14
- export declare const make: (options?: {
15
- readonly prefix?: string | undefined;
16
- } | undefined) => Effect.Effect<{
17
- readonly getAssignments: Effect.Effect<Array<[import("./ShardId.js").ShardId, import("effect/Option").Option<import("./RunnerAddress.js").RunnerAddress>]>, PersistenceError>;
18
- readonly saveAssignments: (assignments: Iterable<readonly [import("./ShardId.js").ShardId, import("effect/Option").Option<import("./RunnerAddress.js").RunnerAddress>]>) => Effect.Effect<void, PersistenceError>;
19
- readonly getRunners: Effect.Effect<Array<[import("./RunnerAddress.js").RunnerAddress, import("./Runner.js").Runner]>, PersistenceError>;
20
- readonly saveRunners: (runners: Iterable<readonly [import("./RunnerAddress.js").RunnerAddress, import("./Runner.js").Runner]>) => Effect.Effect<void, PersistenceError>;
21
- readonly acquire: (address: import("./RunnerAddress.js").RunnerAddress, shardIds: Iterable<import("./ShardId.js").ShardId>) => Effect.Effect<Array<import("./ShardId.js").ShardId>, PersistenceError>;
22
- readonly refresh: (address: import("./RunnerAddress.js").RunnerAddress, shardIds: Iterable<import("./ShardId.js").ShardId>) => Effect.Effect<Array<import("./ShardId.js").ShardId>, PersistenceError>;
23
- readonly release: (address: import("./RunnerAddress.js").RunnerAddress, shardId: import("./ShardId.js").ShardId) => Effect.Effect<void, PersistenceError>;
24
- readonly releaseAll: (address: import("./RunnerAddress.js").RunnerAddress) => Effect.Effect<void, PersistenceError>;
25
- }, SqlError, SqlClient.SqlClient>;
26
- /**
27
- * @since 1.0.0
28
- * @category Layers
29
- */
30
- export declare const layer: Layer.Layer<ShardStorage.ShardStorage, SqlError, SqlClient.SqlClient>;
31
- /**
32
- * @since 1.0.0
33
- * @category Layers
34
- */
35
- export declare const layerWith: (options: {
36
- readonly prefix?: string | undefined;
37
- }) => Layer.Layer<ShardStorage.ShardStorage, SqlError, SqlClient.SqlClient>;
38
- //# sourceMappingURL=SqlShardStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SqlShardStorage.d.ts","sourceRoot":"","sources":["../../src/SqlShardStorage.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAIjD;;;GAGG;AACH,eAAO,MAAM,IAAI;sBACG,MAAM,GAAG,SAAS;;;;;;;;;;iCAmShB,CAAA;AAEtB;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAC7B,YAAY,CAAC,YAAY,EACzB,QAAQ,EACR,SAAS,CAAC,SAAS,CAC8B,CAAA;AAEnD;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC,KAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,CAAC,SAAS,CAChB,CAAA"}
@@ -1,19 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import * as Clock from "effect/Clock";
5
- import * as Effect from "effect/Effect";
6
- import * as Layer from "effect/Layer";
7
- import type { Scope } from "effect/Scope";
8
- import { ShardManagerClient } from "./ShardManager.js";
9
- /**
10
- * @since 1.0.0
11
- * @category Constructors
12
- */
13
- export declare const make: (getRemoteTime: Effect.Effect<number, never, never>) => Effect.Effect<Clock.Clock, never, Scope>;
14
- /**
15
- * @since 1.0.0
16
- * @category Layers
17
- */
18
- export declare const layer: Layer.Layer<never, never, ShardManagerClient>;
19
- //# sourceMappingURL=SynchronizedClock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SynchronizedClock.d.ts","sourceRoot":"","sources":["../../src/SynchronizedClock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,CACtF,KAAK,CAAC,KAAK,EACX,KAAK,EACL,KAAK,CAiDL,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAC7B,KAAK,EACL,KAAK,EACL,kBAAkB,CAKjB,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=shardManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shardManager.d.ts","sourceRoot":"","sources":["../../../src/internal/shardManager.ts"],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import * as HttpClient from "@effect/platform/HttpClient";
5
- import * as HttpClientRequest from "@effect/platform/HttpClientRequest";
6
- import * as Socket from "@effect/platform/Socket";
7
- import * as RpcClient from "@effect/rpc/RpcClient";
8
- import * as RpcSerialization from "@effect/rpc/RpcSerialization";
9
- import * as Effect from "effect/Effect";
10
- import * as Layer from "effect/Layer";
11
- import { RpcClientProtocol } from "./Runners.js";
12
- /**
13
- * @since 1.0.0
14
- * @category Layers
15
- */
16
- export const layerClientProtocolHttp = options => Layer.effect(RpcClientProtocol, Effect.gen(function* () {
17
- const serialization = yield* RpcSerialization.RpcSerialization;
18
- const client = yield* HttpClient.HttpClient;
19
- const https = options.https ?? false;
20
- return address => {
21
- const clientWithUrl = HttpClient.mapRequest(client, HttpClientRequest.prependUrl(`http${https ? "s" : ""}://${address.host}:${address.port}/${options.path}`));
22
- return RpcClient.makeProtocolHttp(clientWithUrl).pipe(Effect.provideService(RpcSerialization.RpcSerialization, serialization));
23
- };
24
- }));
25
- /**
26
- * @since 1.0.0
27
- * @category Layers
28
- */
29
- export const layerClientProtocolWebsocket = options => Layer.effect(RpcClientProtocol, Effect.gen(function* () {
30
- const serialization = yield* RpcSerialization.RpcSerialization;
31
- const https = options.https ?? false;
32
- const constructor = yield* Socket.WebSocketConstructor;
33
- return Effect.fnUntraced(function* (address) {
34
- const socket = yield* Socket.makeWebSocket(`ws${https ? "s" : ""}://${address.host}:${address.port}/${options.path}`).pipe(Effect.provideService(Socket.WebSocketConstructor, constructor));
35
- return yield* RpcClient.makeProtocolSocket().pipe(Effect.provideService(Socket.Socket, socket), Effect.provideService(RpcSerialization.RpcSerialization, serialization));
36
- });
37
- }));
38
- //# sourceMappingURL=HttpCommon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpCommon.js","names":["HttpClient","HttpClientRequest","Socket","RpcClient","RpcSerialization","Effect","Layer","RpcClientProtocol","layerClientProtocolHttp","options","effect","gen","serialization","client","https","address","clientWithUrl","mapRequest","prependUrl","host","port","path","makeProtocolHttp","pipe","provideService","layerClientProtocolWebsocket","constructor","WebSocketConstructor","fnUntraced","socket","makeWebSocket","makeProtocolSocket"],"sources":["../../src/HttpCommon.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,UAAU,MAAM,6BAA6B;AACzD,OAAO,KAAKC,iBAAiB,MAAM,oCAAoC;AACvE,OAAO,KAAKC,MAAM,MAAM,yBAAyB;AACjD,OAAO,KAAKC,SAAS,MAAM,uBAAuB;AAClD,OAAO,KAAKC,gBAAgB,MAAM,8BAA8B;AAChE,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,SAASC,iBAAiB,QAAQ,cAAc;AAEhD;;;;AAIA,OAAO,MAAMC,uBAAuB,GAAIC,OAGvC,IAKCH,KAAK,CAACI,MAAM,CACVH,iBAAiB,EACjBF,MAAM,CAACM,GAAG,CAAC,aAAS;EAClB,MAAMC,aAAa,GAAG,OAAOR,gBAAgB,CAACA,gBAAgB;EAC9D,MAAMS,MAAM,GAAG,OAAOb,UAAU,CAACA,UAAU;EAC3C,MAAMc,KAAK,GAAGL,OAAO,CAACK,KAAK,IAAI,KAAK;EACpC,OAAQC,OAAO,IAAI;IACjB,MAAMC,aAAa,GAAGhB,UAAU,CAACiB,UAAU,CACzCJ,MAAM,EACNZ,iBAAiB,CAACiB,UAAU,CAAC,OAAOJ,KAAK,GAAG,GAAG,GAAG,EAAE,MAAMC,OAAO,CAACI,IAAI,IAAIJ,OAAO,CAACK,IAAI,IAAIX,OAAO,CAACY,IAAI,EAAE,CAAC,CAC1G;IACD,OAAOlB,SAAS,CAAC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