@effect/cluster 0.0.0-snapshot-d33d8b050b8e3c87dcde9587083e6c1cf733f72b

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 (375) hide show
  1. package/AtLeastOnce/package.json +6 -0
  2. package/AtLeastOnceStorage/package.json +6 -0
  3. package/Broadcaster/package.json +6 -0
  4. package/LICENSE +21 -0
  5. package/ManagerConfig/package.json +6 -0
  6. package/Message/package.json +6 -0
  7. package/MessageState/package.json +6 -0
  8. package/Messenger/package.json +6 -0
  9. package/Pod/package.json +6 -0
  10. package/PodAddress/package.json +6 -0
  11. package/Pods/package.json +6 -0
  12. package/PodsHealth/package.json +6 -0
  13. package/PoisonPill/package.json +6 -0
  14. package/README.md +3 -0
  15. package/RecipientAddress/package.json +6 -0
  16. package/RecipientBehaviour/package.json +6 -0
  17. package/RecipientBehaviourContext/package.json +6 -0
  18. package/RecipientType/package.json +6 -0
  19. package/Serialization/package.json +6 -0
  20. package/SerializedEnvelope/package.json +6 -0
  21. package/SerializedMessage/package.json +6 -0
  22. package/ShardId/package.json +6 -0
  23. package/ShardManager/package.json +6 -0
  24. package/ShardManagerClient/package.json +6 -0
  25. package/Sharding/package.json +6 -0
  26. package/ShardingConfig/package.json +6 -0
  27. package/ShardingEvent/package.json +6 -0
  28. package/ShardingException/package.json +6 -0
  29. package/ShardingRegistrationEvent/package.json +6 -0
  30. package/Storage/package.json +6 -0
  31. package/dist/cjs/AtLeastOnce.js +43 -0
  32. package/dist/cjs/AtLeastOnce.js.map +1 -0
  33. package/dist/cjs/AtLeastOnceStorage.js +48 -0
  34. package/dist/cjs/AtLeastOnceStorage.js.map +1 -0
  35. package/dist/cjs/Broadcaster.js +6 -0
  36. package/dist/cjs/Broadcaster.js.map +1 -0
  37. package/dist/cjs/ManagerConfig.js +57 -0
  38. package/dist/cjs/ManagerConfig.js.map +1 -0
  39. package/dist/cjs/Message.js +64 -0
  40. package/dist/cjs/Message.js.map +1 -0
  41. package/dist/cjs/MessageState.js +78 -0
  42. package/dist/cjs/MessageState.js.map +1 -0
  43. package/dist/cjs/Messenger.js +6 -0
  44. package/dist/cjs/Messenger.js.map +1 -0
  45. package/dist/cjs/Pod.js +101 -0
  46. package/dist/cjs/Pod.js.map +1 -0
  47. package/dist/cjs/PodAddress.js +100 -0
  48. package/dist/cjs/PodAddress.js.map +1 -0
  49. package/dist/cjs/Pods.js +58 -0
  50. package/dist/cjs/Pods.js.map +1 -0
  51. package/dist/cjs/PodsHealth.js +64 -0
  52. package/dist/cjs/PodsHealth.js.map +1 -0
  53. package/dist/cjs/PoisonPill.js +101 -0
  54. package/dist/cjs/PoisonPill.js.map +1 -0
  55. package/dist/cjs/RecipientAddress.js +102 -0
  56. package/dist/cjs/RecipientAddress.js.map +1 -0
  57. package/dist/cjs/RecipientBehaviour.js +61 -0
  58. package/dist/cjs/RecipientBehaviour.js.map +1 -0
  59. package/dist/cjs/RecipientBehaviourContext.js +87 -0
  60. package/dist/cjs/RecipientBehaviourContext.js.map +1 -0
  61. package/dist/cjs/RecipientType.js +142 -0
  62. package/dist/cjs/RecipientType.js.map +1 -0
  63. package/dist/cjs/Serialization.js +55 -0
  64. package/dist/cjs/Serialization.js.map +1 -0
  65. package/dist/cjs/SerializedEnvelope.js +111 -0
  66. package/dist/cjs/SerializedEnvelope.js.map +1 -0
  67. package/dist/cjs/SerializedMessage.js +87 -0
  68. package/dist/cjs/SerializedMessage.js.map +1 -0
  69. package/dist/cjs/ShardId.js +89 -0
  70. package/dist/cjs/ShardId.js.map +1 -0
  71. package/dist/cjs/ShardManager.js +48 -0
  72. package/dist/cjs/ShardManager.js.map +1 -0
  73. package/dist/cjs/ShardManagerClient.js +53 -0
  74. package/dist/cjs/ShardManagerClient.js.map +1 -0
  75. package/dist/cjs/Sharding.js +129 -0
  76. package/dist/cjs/Sharding.js.map +1 -0
  77. package/dist/cjs/ShardingConfig.js +64 -0
  78. package/dist/cjs/ShardingConfig.js.map +1 -0
  79. package/dist/cjs/ShardingEvent.js +72 -0
  80. package/dist/cjs/ShardingEvent.js.map +1 -0
  81. package/dist/cjs/ShardingException.js +130 -0
  82. package/dist/cjs/ShardingException.js.map +1 -0
  83. package/dist/cjs/ShardingRegistrationEvent.js +44 -0
  84. package/dist/cjs/ShardingRegistrationEvent.js.map +1 -0
  85. package/dist/cjs/Storage.js +63 -0
  86. package/dist/cjs/Storage.js.map +1 -0
  87. package/dist/cjs/index.js +88 -0
  88. package/dist/cjs/index.js.map +1 -0
  89. package/dist/cjs/internal/atLeastOnce.js +58 -0
  90. package/dist/cjs/internal/atLeastOnce.js.map +1 -0
  91. package/dist/cjs/internal/atLeastOnceStorage.js +186 -0
  92. package/dist/cjs/internal/atLeastOnceStorage.js.map +1 -0
  93. package/dist/cjs/internal/entityManager.js +191 -0
  94. package/dist/cjs/internal/entityManager.js.map +1 -0
  95. package/dist/cjs/internal/entityState.js +70 -0
  96. package/dist/cjs/internal/entityState.js.map +1 -0
  97. package/dist/cjs/internal/managerConfig.js +69 -0
  98. package/dist/cjs/internal/managerConfig.js.map +1 -0
  99. package/dist/cjs/internal/message.js +68 -0
  100. package/dist/cjs/internal/message.js.map +1 -0
  101. package/dist/cjs/internal/messageState.js +102 -0
  102. package/dist/cjs/internal/messageState.js.map +1 -0
  103. package/dist/cjs/internal/podWithMetadata.js +77 -0
  104. package/dist/cjs/internal/podWithMetadata.js.map +1 -0
  105. package/dist/cjs/internal/pods.js +58 -0
  106. package/dist/cjs/internal/pods.js.map +1 -0
  107. package/dist/cjs/internal/podsHealth.js +63 -0
  108. package/dist/cjs/internal/podsHealth.js.map +1 -0
  109. package/dist/cjs/internal/recipientBehaviour.js +75 -0
  110. package/dist/cjs/internal/recipientBehaviour.js.map +1 -0
  111. package/dist/cjs/internal/recipientBehaviourContext.js +59 -0
  112. package/dist/cjs/internal/recipientBehaviourContext.js.map +1 -0
  113. package/dist/cjs/internal/serialization.js +72 -0
  114. package/dist/cjs/internal/serialization.js.map +1 -0
  115. package/dist/cjs/internal/shardManager.js +291 -0
  116. package/dist/cjs/internal/shardManager.js.map +1 -0
  117. package/dist/cjs/internal/shardManagerClient.js +71 -0
  118. package/dist/cjs/internal/shardManagerClient.js.map +1 -0
  119. package/dist/cjs/internal/shardManagerState.js +67 -0
  120. package/dist/cjs/internal/shardManagerState.js.map +1 -0
  121. package/dist/cjs/internal/sharding.js +329 -0
  122. package/dist/cjs/internal/sharding.js.map +1 -0
  123. package/dist/cjs/internal/shardingConfig.js +79 -0
  124. package/dist/cjs/internal/shardingConfig.js.map +1 -0
  125. package/dist/cjs/internal/storage.js +75 -0
  126. package/dist/cjs/internal/storage.js.map +1 -0
  127. package/dist/cjs/internal/utils.js +92 -0
  128. package/dist/cjs/internal/utils.js.map +1 -0
  129. package/dist/dts/AtLeastOnce.d.ts +20 -0
  130. package/dist/dts/AtLeastOnce.d.ts.map +1 -0
  131. package/dist/dts/AtLeastOnceStorage.d.ts +75 -0
  132. package/dist/dts/AtLeastOnceStorage.d.ts.map +1 -0
  133. package/dist/dts/Broadcaster.d.ts +32 -0
  134. package/dist/dts/Broadcaster.d.ts.map +1 -0
  135. package/dist/dts/ManagerConfig.d.ts +61 -0
  136. package/dist/dts/ManagerConfig.d.ts.map +1 -0
  137. package/dist/dts/Message.d.ts +106 -0
  138. package/dist/dts/Message.d.ts.map +1 -0
  139. package/dist/dts/MessageState.d.ts +107 -0
  140. package/dist/dts/MessageState.d.ts.map +1 -0
  141. package/dist/dts/Messenger.d.ts +32 -0
  142. package/dist/dts/Messenger.d.ts.map +1 -0
  143. package/dist/dts/Pod.d.ts +81 -0
  144. package/dist/dts/Pod.d.ts.map +1 -0
  145. package/dist/dts/PodAddress.d.ts +80 -0
  146. package/dist/dts/PodAddress.d.ts.map +1 -0
  147. package/dist/dts/Pods.d.ts +78 -0
  148. package/dist/dts/Pods.d.ts.map +1 -0
  149. package/dist/dts/PodsHealth.d.ts +66 -0
  150. package/dist/dts/PodsHealth.d.ts.map +1 -0
  151. package/dist/dts/PoisonPill.d.ts +78 -0
  152. package/dist/dts/PoisonPill.d.ts.map +1 -0
  153. package/dist/dts/RecipientAddress.d.ts +57 -0
  154. package/dist/dts/RecipientAddress.d.ts.map +1 -0
  155. package/dist/dts/RecipientBehaviour.d.ts +72 -0
  156. package/dist/dts/RecipientBehaviour.d.ts.map +1 -0
  157. package/dist/dts/RecipientBehaviourContext.d.ts +83 -0
  158. package/dist/dts/RecipientBehaviourContext.d.ts.map +1 -0
  159. package/dist/dts/RecipientType.d.ts +96 -0
  160. package/dist/dts/RecipientType.d.ts.map +1 -0
  161. package/dist/dts/Serialization.d.ts +58 -0
  162. package/dist/dts/Serialization.d.ts.map +1 -0
  163. package/dist/dts/SerializedEnvelope.d.ts +87 -0
  164. package/dist/dts/SerializedEnvelope.d.ts.map +1 -0
  165. package/dist/dts/SerializedMessage.d.ts +66 -0
  166. package/dist/dts/SerializedMessage.d.ts.map +1 -0
  167. package/dist/dts/ShardId.d.ts +70 -0
  168. package/dist/dts/ShardId.d.ts.map +1 -0
  169. package/dist/dts/ShardManager.d.ts +44 -0
  170. package/dist/dts/ShardManager.d.ts.map +1 -0
  171. package/dist/dts/ShardManagerClient.d.ts +50 -0
  172. package/dist/dts/ShardManagerClient.d.ts.map +1 -0
  173. package/dist/dts/Sharding.d.ts +146 -0
  174. package/dist/dts/Sharding.d.ts.map +1 -0
  175. package/dist/dts/ShardingConfig.d.ts +69 -0
  176. package/dist/dts/ShardingConfig.d.ts.map +1 -0
  177. package/dist/dts/ShardingEvent.d.ts +90 -0
  178. package/dist/dts/ShardingEvent.d.ts.map +1 -0
  179. package/dist/dts/ShardingException.d.ts +125 -0
  180. package/dist/dts/ShardingException.d.ts.map +1 -0
  181. package/dist/dts/ShardingRegistrationEvent.d.ts +44 -0
  182. package/dist/dts/ShardingRegistrationEvent.d.ts.map +1 -0
  183. package/dist/dts/Storage.d.ts +78 -0
  184. package/dist/dts/Storage.d.ts.map +1 -0
  185. package/dist/dts/index.d.ts +113 -0
  186. package/dist/dts/index.d.ts.map +1 -0
  187. package/dist/dts/internal/atLeastOnce.d.ts +2 -0
  188. package/dist/dts/internal/atLeastOnce.d.ts.map +1 -0
  189. package/dist/dts/internal/atLeastOnceStorage.d.ts +2 -0
  190. package/dist/dts/internal/atLeastOnceStorage.d.ts.map +1 -0
  191. package/dist/dts/internal/entityManager.d.ts +2 -0
  192. package/dist/dts/internal/entityManager.d.ts.map +1 -0
  193. package/dist/dts/internal/entityState.d.ts +21 -0
  194. package/dist/dts/internal/entityState.d.ts.map +1 -0
  195. package/dist/dts/internal/managerConfig.d.ts +2 -0
  196. package/dist/dts/internal/managerConfig.d.ts.map +1 -0
  197. package/dist/dts/internal/message.d.ts +9 -0
  198. package/dist/dts/internal/message.d.ts.map +1 -0
  199. package/dist/dts/internal/messageState.d.ts +2 -0
  200. package/dist/dts/internal/messageState.d.ts.map +1 -0
  201. package/dist/dts/internal/podWithMetadata.d.ts +2 -0
  202. package/dist/dts/internal/podWithMetadata.d.ts.map +1 -0
  203. package/dist/dts/internal/pods.d.ts +2 -0
  204. package/dist/dts/internal/pods.d.ts.map +1 -0
  205. package/dist/dts/internal/podsHealth.d.ts +2 -0
  206. package/dist/dts/internal/podsHealth.d.ts.map +1 -0
  207. package/dist/dts/internal/recipientBehaviour.d.ts +2 -0
  208. package/dist/dts/internal/recipientBehaviour.d.ts.map +1 -0
  209. package/dist/dts/internal/recipientBehaviourContext.d.ts +2 -0
  210. package/dist/dts/internal/recipientBehaviourContext.d.ts.map +1 -0
  211. package/dist/dts/internal/serialization.d.ts +2 -0
  212. package/dist/dts/internal/serialization.d.ts.map +1 -0
  213. package/dist/dts/internal/shardManager.d.ts +12 -0
  214. package/dist/dts/internal/shardManager.d.ts.map +1 -0
  215. package/dist/dts/internal/shardManagerClient.d.ts +2 -0
  216. package/dist/dts/internal/shardManagerClient.d.ts.map +1 -0
  217. package/dist/dts/internal/shardManagerState.d.ts +26 -0
  218. package/dist/dts/internal/shardManagerState.d.ts.map +1 -0
  219. package/dist/dts/internal/sharding.d.ts +2 -0
  220. package/dist/dts/internal/sharding.d.ts.map +1 -0
  221. package/dist/dts/internal/shardingConfig.d.ts +2 -0
  222. package/dist/dts/internal/shardingConfig.d.ts.map +1 -0
  223. package/dist/dts/internal/storage.d.ts +2 -0
  224. package/dist/dts/internal/storage.d.ts.map +1 -0
  225. package/dist/dts/internal/utils.d.ts +2 -0
  226. package/dist/dts/internal/utils.d.ts.map +1 -0
  227. package/dist/esm/AtLeastOnce.js +12 -0
  228. package/dist/esm/AtLeastOnce.js.map +1 -0
  229. package/dist/esm/AtLeastOnceStorage.js +17 -0
  230. package/dist/esm/AtLeastOnceStorage.js.map +1 -0
  231. package/dist/esm/Broadcaster.js +2 -0
  232. package/dist/esm/Broadcaster.js.map +1 -0
  233. package/dist/esm/ManagerConfig.js +26 -0
  234. package/dist/esm/ManagerConfig.js.map +1 -0
  235. package/dist/esm/Message.js +33 -0
  236. package/dist/esm/Message.js.map +1 -0
  237. package/dist/esm/MessageState.js +47 -0
  238. package/dist/esm/MessageState.js.map +1 -0
  239. package/dist/esm/Messenger.js +2 -0
  240. package/dist/esm/Messenger.js.map +1 -0
  241. package/dist/esm/Pod.js +65 -0
  242. package/dist/esm/Pod.js.map +1 -0
  243. package/dist/esm/PodAddress.js +64 -0
  244. package/dist/esm/PodAddress.js.map +1 -0
  245. package/dist/esm/Pods.js +27 -0
  246. package/dist/esm/Pods.js.map +1 -0
  247. package/dist/esm/PodsHealth.js +33 -0
  248. package/dist/esm/PodsHealth.js.map +1 -0
  249. package/dist/esm/PoisonPill.js +65 -0
  250. package/dist/esm/PoisonPill.js.map +1 -0
  251. package/dist/esm/RecipientAddress.js +67 -0
  252. package/dist/esm/RecipientAddress.js.map +1 -0
  253. package/dist/esm/RecipientBehaviour.js +30 -0
  254. package/dist/esm/RecipientBehaviour.js.map +1 -0
  255. package/dist/esm/RecipientBehaviourContext.js +56 -0
  256. package/dist/esm/RecipientBehaviourContext.js.map +1 -0
  257. package/dist/esm/RecipientType.js +105 -0
  258. package/dist/esm/RecipientType.js.map +1 -0
  259. package/dist/esm/Serialization.js +24 -0
  260. package/dist/esm/Serialization.js.map +1 -0
  261. package/dist/esm/SerializedEnvelope.js +75 -0
  262. package/dist/esm/SerializedEnvelope.js.map +1 -0
  263. package/dist/esm/SerializedMessage.js +51 -0
  264. package/dist/esm/SerializedMessage.js.map +1 -0
  265. package/dist/esm/ShardId.js +54 -0
  266. package/dist/esm/ShardId.js.map +1 -0
  267. package/dist/esm/ShardManager.js +17 -0
  268. package/dist/esm/ShardManager.js.map +1 -0
  269. package/dist/esm/ShardManagerClient.js +22 -0
  270. package/dist/esm/ShardManagerClient.js.map +1 -0
  271. package/dist/esm/Sharding.js +98 -0
  272. package/dist/esm/Sharding.js.map +1 -0
  273. package/dist/esm/ShardingConfig.js +33 -0
  274. package/dist/esm/ShardingConfig.js.map +1 -0
  275. package/dist/esm/ShardingEvent.js +62 -0
  276. package/dist/esm/ShardingEvent.js.map +1 -0
  277. package/dist/esm/ShardingException.js +91 -0
  278. package/dist/esm/ShardingException.js.map +1 -0
  279. package/dist/esm/ShardingRegistrationEvent.js +36 -0
  280. package/dist/esm/ShardingRegistrationEvent.js.map +1 -0
  281. package/dist/esm/Storage.js +32 -0
  282. package/dist/esm/Storage.js.map +1 -0
  283. package/dist/esm/index.js +113 -0
  284. package/dist/esm/index.js.map +1 -0
  285. package/dist/esm/internal/atLeastOnce.js +26 -0
  286. package/dist/esm/internal/atLeastOnce.js.map +1 -0
  287. package/dist/esm/internal/atLeastOnceStorage.js +154 -0
  288. package/dist/esm/internal/atLeastOnceStorage.js.map +1 -0
  289. package/dist/esm/internal/entityManager.js +159 -0
  290. package/dist/esm/internal/entityManager.js.map +1 -0
  291. package/dist/esm/internal/entityState.js +35 -0
  292. package/dist/esm/internal/entityState.js.map +1 -0
  293. package/dist/esm/internal/managerConfig.js +38 -0
  294. package/dist/esm/internal/managerConfig.js.map +1 -0
  295. package/dist/esm/internal/message.js +32 -0
  296. package/dist/esm/internal/message.js.map +1 -0
  297. package/dist/esm/internal/messageState.js +66 -0
  298. package/dist/esm/internal/messageState.js.map +1 -0
  299. package/dist/esm/internal/podWithMetadata.js +41 -0
  300. package/dist/esm/internal/podWithMetadata.js.map +1 -0
  301. package/dist/esm/internal/pods.js +25 -0
  302. package/dist/esm/internal/pods.js.map +1 -0
  303. package/dist/esm/internal/podsHealth.js +30 -0
  304. package/dist/esm/internal/podsHealth.js.map +1 -0
  305. package/dist/esm/internal/recipientBehaviour.js +42 -0
  306. package/dist/esm/internal/recipientBehaviour.js.map +1 -0
  307. package/dist/esm/internal/recipientBehaviourContext.js +26 -0
  308. package/dist/esm/internal/recipientBehaviourContext.js.map +1 -0
  309. package/dist/esm/internal/serialization.js +39 -0
  310. package/dist/esm/internal/serialization.js.map +1 -0
  311. package/dist/esm/internal/shardManager.js +256 -0
  312. package/dist/esm/internal/shardManager.js.map +1 -0
  313. package/dist/esm/internal/shardManagerClient.js +38 -0
  314. package/dist/esm/internal/shardManagerClient.js.map +1 -0
  315. package/dist/esm/internal/shardManagerState.js +36 -0
  316. package/dist/esm/internal/shardManagerState.js.map +1 -0
  317. package/dist/esm/internal/sharding.js +288 -0
  318. package/dist/esm/internal/sharding.js.map +1 -0
  319. package/dist/esm/internal/shardingConfig.js +47 -0
  320. package/dist/esm/internal/shardingConfig.js.map +1 -0
  321. package/dist/esm/internal/storage.js +42 -0
  322. package/dist/esm/internal/storage.js.map +1 -0
  323. package/dist/esm/internal/utils.js +56 -0
  324. package/dist/esm/internal/utils.js.map +1 -0
  325. package/dist/esm/package.json +4 -0
  326. package/package.json +259 -0
  327. package/src/AtLeastOnce.ts +28 -0
  328. package/src/AtLeastOnceStorage.ts +96 -0
  329. package/src/Broadcaster.ts +48 -0
  330. package/src/ManagerConfig.ts +67 -0
  331. package/src/Message.ts +132 -0
  332. package/src/MessageState.ts +126 -0
  333. package/src/Messenger.ts +40 -0
  334. package/src/Pod.ts +95 -0
  335. package/src/PodAddress.ts +94 -0
  336. package/src/Pods.ts +100 -0
  337. package/src/PodsHealth.ts +74 -0
  338. package/src/PoisonPill.ts +105 -0
  339. package/src/RecipientAddress.ts +72 -0
  340. package/src/RecipientBehaviour.ts +108 -0
  341. package/src/RecipientBehaviourContext.ts +101 -0
  342. package/src/RecipientType.ts +134 -0
  343. package/src/Serialization.ts +72 -0
  344. package/src/SerializedEnvelope.ts +109 -0
  345. package/src/SerializedMessage.ts +82 -0
  346. package/src/ShardId.ts +79 -0
  347. package/src/ShardManager.ts +53 -0
  348. package/src/ShardManagerClient.ts +57 -0
  349. package/src/Sharding.ts +214 -0
  350. package/src/ShardingConfig.ts +76 -0
  351. package/src/ShardingEvent.ts +121 -0
  352. package/src/ShardingException.ts +151 -0
  353. package/src/ShardingRegistrationEvent.ts +62 -0
  354. package/src/Storage.ts +92 -0
  355. package/src/index.ts +139 -0
  356. package/src/internal/atLeastOnce.ts +59 -0
  357. package/src/internal/atLeastOnceStorage.ts +218 -0
  358. package/src/internal/entityManager.ts +404 -0
  359. package/src/internal/entityState.ts +64 -0
  360. package/src/internal/managerConfig.ts +84 -0
  361. package/src/internal/message.ts +64 -0
  362. package/src/internal/messageState.ts +98 -0
  363. package/src/internal/podWithMetadata.ts +72 -0
  364. package/src/internal/pods.ts +29 -0
  365. package/src/internal/podsHealth.ts +39 -0
  366. package/src/internal/recipientBehaviour.ts +133 -0
  367. package/src/internal/recipientBehaviourContext.ts +70 -0
  368. package/src/internal/serialization.ts +59 -0
  369. package/src/internal/shardManager.ts +593 -0
  370. package/src/internal/shardManagerClient.ts +49 -0
  371. package/src/internal/shardManagerState.ts +80 -0
  372. package/src/internal/sharding.ts +793 -0
  373. package/src/internal/shardingConfig.ts +97 -0
  374. package/src/internal/storage.ts +60 -0
  375. package/src/internal/utils.ts +54 -0
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Effect from "effect/Effect"
5
+ import type * as HashMap from "effect/HashMap"
6
+ import type * as Option from "effect/Option"
7
+ import type * as Stream from "effect/Stream"
8
+ import * as internal from "./internal/shardManager.js"
9
+ import type * as Pod from "./Pod.js"
10
+ import type * as PodAddress from "./PodAddress.js"
11
+ import type * as ShardId from "./ShardId.js"
12
+ import type * as ShardingEvent from "./ShardingEvent.js"
13
+
14
+ /**
15
+ * @since 1.0.0
16
+ * @category symbols
17
+ */
18
+ export const ShardManagerTypeId: unique symbol = internal.ShardManagerTypeId
19
+
20
+ /**
21
+ * @since 1.0.0
22
+ * @category symbols
23
+ */
24
+ export type ShardManagerTypeId = typeof ShardManagerTypeId
25
+
26
+ /**
27
+ * @since 1.0.0
28
+ * @category context
29
+ */
30
+ export const ShardManager = internal.shardManagerTag
31
+
32
+ /**
33
+ * @since 1.0.0
34
+ * @category models
35
+ */
36
+ export interface ShardManager {
37
+ readonly getShardingEvents: Stream.Stream<ShardingEvent.ShardingEvent>
38
+ readonly register: (pod: Pod.Pod) => Effect.Effect<void>
39
+ readonly unregister: (podAddress: PodAddress.PodAddress) => Effect.Effect<void>
40
+ readonly notifyUnhealthyPod: (podAddress: PodAddress.PodAddress) => Effect.Effect<void>
41
+ readonly checkAllPodsHealth: Effect.Effect<void>
42
+ readonly getAssignments: Effect.Effect<HashMap.HashMap<ShardId.ShardId, Option.Option<PodAddress.PodAddress>>>
43
+ /* @internal */
44
+ readonly rebalance: (rebalanceImmediately: boolean) => Effect.Effect<void>
45
+ /* @internal */
46
+ readonly persistPods: Effect.Effect<void>
47
+ }
48
+
49
+ /**
50
+ * @since 1.0.0
51
+ * @category layers
52
+ */
53
+ export const live = internal.live
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Context from "effect/Context"
5
+ import type * as Effect from "effect/Effect"
6
+ import type * as HashMap from "effect/HashMap"
7
+ import type * as Layer from "effect/Layer"
8
+ import type * as Option from "effect/Option"
9
+ import * as internal from "./internal/shardManagerClient.js"
10
+ import type * as PodAddress from "./PodAddress.js"
11
+ import type * as ShardId from "./ShardId.js"
12
+ import type * as ShardingConfig from "./ShardingConfig.js"
13
+
14
+ /**
15
+ * @since 1.0.0
16
+ * @category symbols
17
+ */
18
+ export const ShardManagerClientTypeId: unique symbol = internal.ShardManagerClientTypeId
19
+
20
+ /**
21
+ * @since 1.0.0
22
+ * @category models
23
+ */
24
+ export type ShardManagerClientTypeId = typeof ShardManagerClientTypeId
25
+
26
+ /**
27
+ * ShardManagerClient provides the methods exposed by the ShardManager and called by the Pod.
28
+ *
29
+ * @since 1.0.0
30
+ * @category models
31
+ */
32
+ export interface ShardManagerClient {
33
+ readonly [ShardManagerClientTypeId]: ShardManagerClientTypeId
34
+ readonly register: (podAddress: PodAddress.PodAddress) => Effect.Effect<void>
35
+ readonly unregister: (podAddress: PodAddress.PodAddress) => Effect.Effect<void>
36
+ readonly notifyUnhealthyPod: (podAddress: PodAddress.PodAddress) => Effect.Effect<void>
37
+ readonly getAssignments: Effect.Effect<HashMap.HashMap<ShardId.ShardId, Option.Option<PodAddress.PodAddress>>>
38
+ }
39
+
40
+ /**
41
+ * @since 1.0.0
42
+ * @category constructors
43
+ */
44
+ export const make: (args: Omit<ShardManagerClient, typeof ShardManagerClientTypeId>) => ShardManagerClient =
45
+ internal.make
46
+
47
+ /**
48
+ * @since 1.0.0
49
+ * @category context
50
+ */
51
+ export const ShardManagerClient: Context.Tag<ShardManagerClient, ShardManagerClient> = internal.shardManagerClientTag
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category layers
56
+ */
57
+ export const local: Layer.Layer<ShardManagerClient, never, ShardingConfig.ShardingConfig> = internal.local
@@ -0,0 +1,214 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Effect from "effect/Effect"
5
+ import type * as HashSet from "effect/HashSet"
6
+ import type * as Scope from "effect/Scope"
7
+ import type * as Stream from "effect/Stream"
8
+ import type { Broadcaster } from "./Broadcaster.js"
9
+ import * as internal from "./internal/sharding.js"
10
+ import type * as Message from "./Message.js"
11
+ import type * as MessageState from "./MessageState.js"
12
+ import type { Messenger } from "./Messenger.js"
13
+ import type * as PodAddress from "./PodAddress.js"
14
+ import type * as RecipientAddress from "./RecipientAddress.js"
15
+ import type * as RecipientBehaviour from "./RecipientBehaviour.js"
16
+ import type * as RecipientBehaviourContext from "./RecipientBehaviourContext.js"
17
+ import type * as RecipentType from "./RecipientType.js"
18
+ import type * as SerializedEnvelope from "./SerializedEnvelope.js"
19
+ import type * as SerializedMessage from "./SerializedMessage.js"
20
+ import type * as ShardId from "./ShardId.js"
21
+ import type * as ShardingException from "./ShardingException.js"
22
+ import type * as ShardingRegistrationEvent from "./ShardingRegistrationEvent.js"
23
+
24
+ /**
25
+ * @since 1.0.0
26
+ * @category symbols
27
+ */
28
+ export const ShardingTypeId: unique symbol = internal.ShardingTypeId
29
+
30
+ /**
31
+ * @since 1.0.0
32
+ * @category symbols
33
+ */
34
+ export type ShardingTypeId = typeof ShardingTypeId
35
+
36
+ /**
37
+ * @since 1.0.0
38
+ * @category models
39
+ */
40
+ export interface Sharding {
41
+ readonly [ShardingTypeId]: ShardingTypeId
42
+ readonly register: Effect.Effect<void>
43
+ readonly unregister: Effect.Effect<void>
44
+ readonly messenger: <Msg extends Message.Message.Any>(
45
+ entityType: RecipentType.EntityType<Msg>
46
+ ) => Messenger<Msg>
47
+ readonly broadcaster: <Msg extends Message.Message.Any>(
48
+ topicType: RecipentType.TopicType<Msg>
49
+ ) => Broadcaster<Msg>
50
+ readonly isEntityOnLocalShards: (
51
+ recipientAddress: RecipientAddress.RecipientAddress
52
+ ) => Effect.Effect<boolean>
53
+ readonly isShuttingDown: Effect.Effect<boolean>
54
+
55
+ readonly registerScoped: Effect.Effect<void, never, Scope.Scope>
56
+ readonly registerEntity: <Msg extends Message.Message.Any>(
57
+ entityType: RecipentType.EntityType<Msg>
58
+ ) => <R>(
59
+ behaviour: RecipientBehaviour.RecipientBehaviour<Msg, R>,
60
+ options?: RecipientBehaviour.EntityBehaviourOptions
61
+ ) => Effect.Effect<void, never, Exclude<R, RecipientBehaviourContext.RecipientBehaviourContext>>
62
+ readonly registerTopic: <Msg extends Message.Message.Any>(
63
+ topicType: RecipentType.TopicType<Msg>
64
+ ) => <R>(
65
+ behaviour: RecipientBehaviour.RecipientBehaviour<Msg, R>,
66
+ options?: RecipientBehaviour.EntityBehaviourOptions
67
+ ) => Effect.Effect<void, never, Exclude<R, RecipientBehaviourContext.RecipientBehaviourContext>>
68
+ readonly getShardingRegistrationEvents: Stream.Stream<ShardingRegistrationEvent.ShardingRegistrationEvent>
69
+ readonly registerSingleton: <R>(name: string, run: Effect.Effect<void, never, R>) => Effect.Effect<void, never, R>
70
+ readonly assign: (shards: HashSet.HashSet<ShardId.ShardId>) => Effect.Effect<void>
71
+ readonly unassign: (shards: HashSet.HashSet<ShardId.ShardId>) => Effect.Effect<void>
72
+ readonly sendMessageToLocalEntityManagerWithoutRetries: (
73
+ message: SerializedEnvelope.SerializedEnvelope
74
+ ) => Effect.Effect<
75
+ MessageState.MessageState<SerializedMessage.SerializedMessage>,
76
+ ShardingException.ShardingException
77
+ >
78
+ readonly getPods: Effect.Effect<HashSet.HashSet<PodAddress.PodAddress>>
79
+ readonly getAssignedShardIds: Effect.Effect<HashSet.HashSet<ShardId.ShardId>>
80
+ /** @internal */
81
+ readonly refreshAssignments: Effect.Effect<void, never, Scope.Scope>
82
+ /** @internal */
83
+ readonly getShardId: (recipientAddress: RecipientAddress.RecipientAddress) => ShardId.ShardId
84
+ }
85
+
86
+ /**
87
+ * @since 1.0.0
88
+ * @category context
89
+ */
90
+ export const Tag = internal.shardingTag
91
+
92
+ /**
93
+ * @since 1.0.0
94
+ * @category layers
95
+ */
96
+ export const live = internal.live
97
+
98
+ /**
99
+ * Notify the shard manager that shards can now be assigned to this pod.
100
+ *
101
+ * @since 1.0.0
102
+ * @category utils
103
+ */
104
+ export const register: Effect.Effect<void, never, Sharding> = internal.register
105
+
106
+ /**
107
+ * Notify the shard manager that shards must be unassigned from this pod.
108
+ *
109
+ * @since 1.0.0
110
+ * @category utils
111
+ */
112
+ export const unregister: Effect.Effect<void, never, Sharding> = internal.unregister
113
+
114
+ /**
115
+ * Same as `register`, but will automatically call `unregister` when the `Scope` is terminated.
116
+ *
117
+ * @since 1.0.0
118
+ * @category utils
119
+ */
120
+ export const registerScoped: Effect.Effect<void, never, Scope.Scope | Sharding> = internal.registerScoped
121
+
122
+ /**
123
+ * Start a computation that is guaranteed to run only on a single pod.
124
+ * Each pod should call `registerSingleton` but only a single pod will actually run it at any given time.
125
+ *
126
+ * @since 1.0.0
127
+ * @category utils
128
+ */
129
+ export const registerSingleton: <R>(
130
+ name: string,
131
+ run: Effect.Effect<void, never, R>
132
+ ) => Effect.Effect<void, never, Sharding | R> = internal.registerSingleton
133
+
134
+ /**
135
+ * Register a new entity type, allowing pods to send messages to entities of this type.
136
+ *
137
+ * @since 1.0.0
138
+ * @category utils
139
+ */
140
+ export const registerEntity: <Msg extends Message.Message.Any>(
141
+ entityType: RecipentType.EntityType<Msg>
142
+ ) => <R>(
143
+ behavior: RecipientBehaviour.RecipientBehaviour<Msg, R>,
144
+ options?: RecipientBehaviour.EntityBehaviourOptions | undefined
145
+ ) => Effect.Effect<void, never, Sharding | Exclude<R, RecipientBehaviourContext.RecipientBehaviourContext>> =
146
+ internal.registerEntity
147
+
148
+ /**
149
+ * Register a new topic type, allowing pods to broadcast messages to subscribers.
150
+ *
151
+ * @since 1.0.0
152
+ * @category utils
153
+ */
154
+ export const registerTopic: <Msg extends Message.Message.Any>(
155
+ topicType: RecipentType.TopicType<Msg>
156
+ ) => <R>(
157
+ behavior: RecipientBehaviour.RecipientBehaviour<Msg, R>,
158
+ options?: RecipientBehaviour.EntityBehaviourOptions | undefined
159
+ ) => Effect.Effect<void, never, Sharding | Exclude<R, RecipientBehaviourContext.RecipientBehaviourContext>> =
160
+ internal.registerTopic
161
+
162
+ /**
163
+ * Get an object that allows sending messages to a given entity type.
164
+ * You can provide a custom send timeout to override the one globally defined.
165
+ *
166
+ * @since 1.0.0
167
+ * @category utils
168
+ */
169
+ export const messenger: <Msg extends Message.Message.Any>(
170
+ entityType: RecipentType.EntityType<Msg>
171
+ ) => Effect.Effect<Messenger<Msg>, never, Sharding> = internal.messenger
172
+
173
+ /**
174
+ * Get an object that allows broadcasting messages to a given topic type.
175
+ * You can provide a custom send timeout to override the one globally defined.
176
+ *
177
+ * @since 1.0.0
178
+ * @category utils
179
+ */
180
+ export const broadcaster: <Msg extends Message.Message.Any>(
181
+ topicType: RecipentType.TopicType<Msg>
182
+ ) => Effect.Effect<Broadcaster<Msg>, never, Sharding> = internal.broadcaster
183
+
184
+ /**
185
+ * Get the list of pods currently registered to the Shard Manager
186
+ *
187
+ * @since 1.0.0
188
+ * @category utils
189
+ */
190
+ export const getPods: Effect.Effect<HashSet.HashSet<PodAddress.PodAddress>, never, Sharding> = internal.getPods
191
+
192
+ /**
193
+ * Sends a raw message to the local entity manager without performing reties.
194
+ * Those are up to the caller.
195
+ *
196
+ * @since 1.0.0
197
+ * @category utils
198
+ */
199
+ export const sendMessageToLocalEntityManagerWithoutRetries: (
200
+ message: SerializedEnvelope.SerializedEnvelope
201
+ ) => Effect.Effect<
202
+ MessageState.MessageState<SerializedMessage.SerializedMessage>,
203
+ ShardingException.ShardingException,
204
+ Sharding
205
+ > = internal.sendMessageToLocalEntityManagerWithoutRetries
206
+
207
+ /**
208
+ * Gets the list of shardIds assigned to the current Pod
209
+ *
210
+ * @since 1.0.0
211
+ * @category utils
212
+ */
213
+ export const getAssignedShardIds: Effect.Effect<HashSet.HashSet<ShardId.ShardId>, never, Sharding> =
214
+ internal.getAssignedShardIds
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as ConfigError from "effect/ConfigError"
5
+ import type * as Context from "effect/Context"
6
+ import type * as Duration from "effect/Duration"
7
+ import type * as Layer from "effect/Layer"
8
+ import * as internal from "./internal/shardingConfig.js"
9
+
10
+ /**
11
+ * @since 1.0.0
12
+ * @category symbols
13
+ */
14
+ export const ShardingConfigTypeId: unique symbol = internal.ShardingConfigTypeId
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category symbols
19
+ */
20
+ export type ShardingConfigTypeId = typeof ShardingConfigTypeId
21
+
22
+ /**
23
+ * Sharding configuration
24
+ * @param numberOfShards number of shards (see documentation on how to choose this), should be same on all nodes
25
+ * @param selfHost hostname or IP address of the current pod
26
+ * @param shardingPort port used for pods to communicate together
27
+ * @param shardManagerUri url of the Shard Manager API
28
+ * @param serverVersion version of the current pod
29
+ * @param entityMaxIdleTime time of inactivity (without receiving any message) after which an entity will be interrupted
30
+ * @param entityTerminationTimeout time we give to an entity to handle the termination message before interrupting it
31
+ * @param refreshAssignmentsRetryInterval retry interval in case of failure getting shard assignments from storage
32
+ * @param unhealthyPodReportInterval interval to report unhealthy pods to the Shard Manager (this exists to prevent calling the Shard Manager for each failed message)
33
+ * @since 1.0.0
34
+ * @category models
35
+ */
36
+ export interface ShardingConfig {
37
+ readonly numberOfShards: number
38
+ readonly selfHost: string
39
+ readonly shardingPort: number
40
+ readonly shardManagerUri: string
41
+ readonly serverVersion: string
42
+ readonly entityMaxIdleTime: Duration.Duration
43
+ readonly entityTerminationTimeout: Duration.Duration
44
+ readonly refreshAssignmentsRetryInterval: Duration.Duration
45
+ readonly unhealthyPodReportInterval: Duration.Duration
46
+ }
47
+
48
+ /**
49
+ * @since 1.0.0
50
+ * @category context
51
+ */
52
+ export const ShardingConfig: Context.Tag<ShardingConfig, ShardingConfig> = internal.shardingConfigTag
53
+
54
+ /**
55
+ * Provides the default values for the ShardingConfig.
56
+ *
57
+ * @since 1.0.0
58
+ * @category layers
59
+ */
60
+ export const defaults: Layer.Layer<ShardingConfig> = internal.defaults
61
+
62
+ /**
63
+ * Provides the ShardingConfig, values that are omitted will be read from the defaults
64
+ *
65
+ * @since 1.0.0
66
+ * @category layers
67
+ */
68
+ export const withDefaults: (customs: Partial<ShardingConfig>) => Layer.Layer<ShardingConfig> = internal.withDefaults
69
+
70
+ /**
71
+ * Reads the ShardingConfig from the effect/ConfigProvider
72
+ *
73
+ * @since 1.0.0
74
+ * @category layers
75
+ */
76
+ export const fromConfig: Layer.Layer<ShardingConfig, ConfigError.ConfigError> = internal.fromConfig
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as HashSet from "effect/HashSet"
5
+ import type * as PodAddress from "./PodAddress.js"
6
+ import type * as ShardId from "./ShardId.js"
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category models
11
+ */
12
+ export interface ShardsAssigned {
13
+ readonly _tag: "ShardsAssigned"
14
+ readonly pod: PodAddress.PodAddress
15
+ readonly shards: HashSet.HashSet<ShardId.ShardId>
16
+ }
17
+
18
+ /**
19
+ * Constructs the event that occurs when new shards are assigned to Pod.
20
+ *
21
+ * @since 1.0.0
22
+ * @category constructors
23
+ */
24
+ export function ShardsAssigned(
25
+ pod: PodAddress.PodAddress,
26
+ shards: HashSet.HashSet<ShardId.ShardId>
27
+ ): ShardsAssigned {
28
+ return { _tag: "ShardsAssigned", pod, shards }
29
+ }
30
+
31
+ /**
32
+ * @since 1.0.0
33
+ * @category models
34
+ */
35
+ export interface ShardsUnassigned {
36
+ readonly _tag: "ShardsUnassigned"
37
+ readonly pod: PodAddress.PodAddress
38
+ readonly shards: HashSet.HashSet<ShardId.ShardId>
39
+ }
40
+
41
+ /**
42
+ * Constructs the event that occurs when shards are unassigned to a Pod
43
+ * @since 1.0.0
44
+ * @category constructors
45
+ */
46
+ export function ShardsUnassigned(
47
+ pod: PodAddress.PodAddress,
48
+ shards: HashSet.HashSet<ShardId.ShardId>
49
+ ): ShardsUnassigned {
50
+ return { _tag: "ShardsUnassigned", pod, shards }
51
+ }
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category models
56
+ */
57
+ export interface PodHealthChecked {
58
+ readonly _tag: "PodHealthChecked"
59
+ readonly pod: PodAddress.PodAddress
60
+ }
61
+
62
+ /**
63
+ * Constructs the event that occurs when the health of a Pod has been checked
64
+ *
65
+ * @since 1.0.0
66
+ * @category constructors
67
+ */
68
+ export function PodHealthChecked(pod: PodAddress.PodAddress): PodHealthChecked {
69
+ return { _tag: "PodHealthChecked", pod }
70
+ }
71
+
72
+ /**
73
+ * @since 1.0.0
74
+ * @category models
75
+ */
76
+ export interface PodRegistered {
77
+ readonly _tag: "PodRegistered"
78
+ readonly pod: PodAddress.PodAddress
79
+ }
80
+
81
+ /**
82
+ * Constructs the event that occurs when a new Pod has registered
83
+ *
84
+ * @since 1.0.0
85
+ * @category constructors
86
+ */
87
+ export function PodRegistered(pod: PodAddress.PodAddress): PodRegistered {
88
+ return { _tag: "PodRegistered", pod }
89
+ }
90
+
91
+ /**
92
+ * @since 1.0.0
93
+ * @category models
94
+ */
95
+ export interface PodUnregistered {
96
+ readonly _tag: "PodUnregistered"
97
+ readonly pod: PodAddress.PodAddress
98
+ }
99
+
100
+ /**
101
+ * Constructs the event that occurs when a pod has unregistered
102
+ *
103
+ * @since 1.0.0
104
+ * @category constructors
105
+ */
106
+ export function PodUnregistered(pod: PodAddress.PodAddress): PodUnregistered {
107
+ return { _tag: "PodUnregistered", pod }
108
+ }
109
+
110
+ /**
111
+ * This are the events that may occur over the ShardManager during its lifetime.
112
+ *
113
+ * @since 1.0.0
114
+ * @category models
115
+ */
116
+ export type ShardingEvent =
117
+ | ShardsAssigned
118
+ | ShardsUnassigned
119
+ | PodHealthChecked
120
+ | PodRegistered
121
+ | PodUnregistered
@@ -0,0 +1,151 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import * as Schema from "@effect/schema/Schema"
5
+ import * as PodAddress from "./PodAddress.js"
6
+ import * as RecipientAddress from "./RecipientAddress.js"
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category models
11
+ */
12
+ export class EntityNotManagedByThisPodException extends Schema.TaggedError<EntityNotManagedByThisPodException>()(
13
+ "@effect/cluster/EntityNotManagedByThisPodException",
14
+ {
15
+ recipientAddress: RecipientAddress.RecipientAddress
16
+ }
17
+ ) {
18
+ }
19
+
20
+ /**
21
+ * @since 1.0.0
22
+ * @category utils
23
+ */
24
+ export const isEntityNotManagedByThisPodException = Schema.is(EntityNotManagedByThisPodException)
25
+
26
+ /**
27
+ * @since 1.0.0
28
+ * @category models
29
+ */
30
+ export class EntityTypeNotRegisteredException extends Schema.TaggedError<EntityTypeNotRegisteredException>()(
31
+ "@effect/cluster/EntityTypeNotRegisteredException",
32
+ {
33
+ entityType: Schema.String,
34
+ podAddress: PodAddress.schema
35
+ }
36
+ ) {
37
+ }
38
+
39
+ /**
40
+ * @since 1.0.0
41
+ * @category utils
42
+ */
43
+ export const isEntityTypeNotRegisteredException = Schema.is(EntityTypeNotRegisteredException)
44
+
45
+ /**
46
+ * @since 1.0.0
47
+ * @category models
48
+ */
49
+ export class NoResultInProcessedMessageStateException
50
+ extends Schema.TaggedError<NoResultInProcessedMessageStateException>()(
51
+ "@effect/cluster/NoResultInProcessedMessageStateException",
52
+ {}
53
+ )
54
+ {
55
+ }
56
+
57
+ /**
58
+ * @since 1.0.0
59
+ * @category utils
60
+ */
61
+ export const isNoResultInProcessedMessageStateException = Schema.is(NoResultInProcessedMessageStateException)
62
+
63
+ /**
64
+ * @since 1.0.0
65
+ * @category models
66
+ */
67
+ export class PodNoLongerRegisteredException extends Schema.TaggedError<PodNoLongerRegisteredException>()(
68
+ "@effect/cluster/PodNoLongerRegisteredException",
69
+ {
70
+ podAddress: PodAddress.schema
71
+ }
72
+ ) {
73
+ }
74
+
75
+ /**
76
+ * @since 1.0.0
77
+ * @category utils
78
+ */
79
+ export const isPodNoLongerRegisteredException = Schema.is(PodNoLongerRegisteredException)
80
+
81
+ /**
82
+ * @since 1.0.0
83
+ * @category models
84
+ */
85
+ export class PodUnavailableException extends Schema.TaggedError<PodUnavailableException>()(
86
+ "@effect/cluster/PodUnavailableException",
87
+ {
88
+ podAddress: PodAddress.schema
89
+ }
90
+ ) {
91
+ }
92
+
93
+ /**
94
+ * @since 1.0.0
95
+ * @category utils
96
+ */
97
+ export const isPodUnavailableException = Schema.is(PodUnavailableException)
98
+
99
+ /**
100
+ * @since 1.0.0
101
+ * @category models
102
+ */
103
+ export class SerializationException extends Schema.TaggedError<SerializationException>()(
104
+ "@effect/cluster/SerializationException",
105
+ {}
106
+ ) {
107
+ }
108
+
109
+ /**
110
+ * @since 1.0.0
111
+ * @category utils
112
+ */
113
+ export const isSerializationException = Schema.is(SerializationException)
114
+
115
+ /**
116
+ * @since 1.0.0
117
+ * @category models
118
+ */
119
+ export class ExceptionWhileOfferingMessageException
120
+ extends Schema.TaggedError<ExceptionWhileOfferingMessageException>()(
121
+ "@effect/cluster/ExceptionWhileOfferingMessageException",
122
+ {}
123
+ )
124
+ {
125
+ }
126
+
127
+ /**
128
+ * @since 1.0.0
129
+ * @category utils
130
+ */
131
+ export const isExceptionWhileOfferingMessageException = Schema.is(ExceptionWhileOfferingMessageException)
132
+
133
+ /**
134
+ * @since 1.0.0
135
+ * @category schema
136
+ */
137
+ export const schema = Schema.Union(
138
+ SerializationException,
139
+ EntityNotManagedByThisPodException,
140
+ EntityTypeNotRegisteredException,
141
+ PodNoLongerRegisteredException,
142
+ PodUnavailableException,
143
+ NoResultInProcessedMessageStateException,
144
+ ExceptionWhileOfferingMessageException
145
+ )
146
+
147
+ /**
148
+ * @since 1.0.0
149
+ * @category models
150
+ */
151
+ export type ShardingException = Schema.Schema.Type<typeof schema>