pg_eventstore 2.0.0 → 3.0.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 (303) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/CHANGELOG.md +186 -20
  4. data/README.md +25 -15
  5. data/db/migrations/10_setup_pg_cron.rb +1 -23
  6. data/db/migrations/15_create_streams_global_index.sql +17 -0
  7. data/db/migrations/16_populate_streams_global_index.rb +150 -0
  8. data/db/migrations/17_create_events_global_index.sql +62 -0
  9. data/db/migrations/18_populate_events_global_index.rb +124 -0
  10. data/db/migrations/19_populate_events_global_index_p2.rb +25 -0
  11. data/db/migrations/20_migrate_subscriptions_current_position.sql +19 -0
  12. data/db/migrations/21_create_partitions_stats.sql +2 -0
  13. data/db/migrations/22_drop_streams_sql_view.sql +2 -0
  14. data/db/migrations/23_adjust_partitions_indexes.sql +5 -0
  15. data/db/migrations/24_drop_legacy_events_indexes.sql +3 -0
  16. data/db/migrations/25_add_parent_partitions_info_to_partitions.sql +16 -0
  17. data/db/migrations/26_change_events_stream_revision_type.rb +35 -0
  18. data/db/migrations/27_drop_events_horizon.sql +3 -0
  19. data/db/migrations/28_create_maintenance_tasks.sql +8 -0
  20. data/db/migrations/29_create_event_markers.sql +35 -0
  21. data/db/migrations/30_improve_partitions_search_in_admin_ui.rb +24 -0
  22. data/db/migrations/31_drop_events_id_default_value.sql +1 -0
  23. data/db/migrations/32_create_parittions_triggers.sql +101 -0
  24. data/docs/AGENTS.fragment.md +696 -0
  25. data/docs/admin_ui.md +3 -1
  26. data/docs/appending_events.md +110 -49
  27. data/docs/configuration.md +69 -36
  28. data/docs/event_tracing.md +55 -0
  29. data/docs/events_and_streams.md +54 -30
  30. data/docs/how_it_works.md +57 -16
  31. data/docs/linking_events.md +2 -1
  32. data/docs/maintenance.md +14 -5
  33. data/docs/multiple_commands.md +17 -8
  34. data/docs/reading_events.md +208 -43
  35. data/docs/reading_streams.md +50 -0
  36. data/docs/replication.md +99 -0
  37. data/docs/subscriptions.md +165 -35
  38. data/docs/writing_middleware.md +25 -8
  39. data/ext/pg_eventstore_ext/extconf.rb +5 -0
  40. data/ext/pg_eventstore_ext/pg_eventstore_ext.c +74 -0
  41. data/lib/pg_eventstore/async_runner.rb +63 -0
  42. data/lib/pg_eventstore/basic_config.rb +15 -0
  43. data/lib/pg_eventstore/chunks/chunk.rb +31 -0
  44. data/lib/pg_eventstore/chunks/read_api_events_index_chunk.rb +83 -0
  45. data/lib/pg_eventstore/chunks/replica_events_index_chunk.rb +35 -0
  46. data/lib/pg_eventstore/chunks/repository.rb +73 -0
  47. data/lib/pg_eventstore/chunks/subscription_checkpoint_chunk.rb +48 -0
  48. data/lib/pg_eventstore/chunks/subscription_events_index_chunk.rb +99 -0
  49. data/lib/pg_eventstore/chunks.rb +14 -0
  50. data/lib/pg_eventstore/client.rb +163 -50
  51. data/lib/pg_eventstore/commands/append.rb +62 -43
  52. data/lib/pg_eventstore/commands/delete_event.rb +7 -8
  53. data/lib/pg_eventstore/commands/delete_stream.rb +3 -3
  54. data/lib/pg_eventstore/commands/event_modifiers/prepare_link_event.rb +9 -7
  55. data/lib/pg_eventstore/commands/event_modifiers/prepare_regular_event.rb +12 -7
  56. data/lib/pg_eventstore/commands/link_to.rb +5 -5
  57. data/lib/pg_eventstore/commands/read.rb +23 -5
  58. data/lib/pg_eventstore/commands/read_grouped.rb +46 -0
  59. data/lib/pg_eventstore/commands/read_streams.rb +18 -0
  60. data/lib/pg_eventstore/commands/read_streams_paginated.rb +56 -0
  61. data/lib/pg_eventstore/commands/regular_stream_read_paginated.rb +4 -4
  62. data/lib/pg_eventstore/commands/revision_check/current_revision.rb +51 -0
  63. data/lib/pg_eventstore/commands/revision_check/event_type_revisions_comparison.rb +46 -0
  64. data/lib/pg_eventstore/commands/revision_check/expected_revision.rb +135 -0
  65. data/lib/pg_eventstore/commands/revision_check/stream_revision_check.rb +98 -0
  66. data/lib/pg_eventstore/commands/revision_check/stream_revision_comparison.rb +36 -0
  67. data/lib/pg_eventstore/commands/stream_revision.rb +14 -0
  68. data/lib/pg_eventstore/commands/system_stream_read_paginated.rb +4 -4
  69. data/lib/pg_eventstore/commands.rb +4 -2
  70. data/lib/pg_eventstore/config.rb +30 -9
  71. data/lib/pg_eventstore/connection.rb +21 -2
  72. data/lib/pg_eventstore/errors.rb +136 -10
  73. data/lib/pg_eventstore/event.rb +34 -2
  74. data/lib/pg_eventstore/event_deserializer.rb +5 -4
  75. data/lib/pg_eventstore/event_global_index.rb +118 -0
  76. data/lib/pg_eventstore/event_marker.rb +16 -0
  77. data/lib/pg_eventstore/event_marker_index.rb +25 -0
  78. data/lib/pg_eventstore/event_serializer.rb +6 -0
  79. data/lib/pg_eventstore/extensions/acts_as_configurable.rb +88 -0
  80. data/lib/pg_eventstore/extensions/options_defaults.rb +25 -0
  81. data/lib/pg_eventstore/extensions/options_extension.rb +2 -2
  82. data/lib/pg_eventstore/feature_marker.rb +18 -0
  83. data/lib/pg_eventstore/maintenance.rb +11 -6
  84. data/lib/pg_eventstore/middleware/event_tracing.rb +53 -0
  85. data/lib/pg_eventstore/partition.rb +6 -0
  86. data/lib/pg_eventstore/pg_connection.rb +70 -14
  87. data/lib/pg_eventstore/queries/event_marker_queries.rb +74 -0
  88. data/lib/pg_eventstore/queries/event_queries.rb +7 -93
  89. data/lib/pg_eventstore/queries/events_global_index_queries.rb +131 -0
  90. data/lib/pg_eventstore/queries/index_filtering_queries.rb +179 -0
  91. data/lib/pg_eventstore/queries/links_resolver.rb +4 -4
  92. data/lib/pg_eventstore/queries/maintenance_queries.rb +159 -42
  93. data/lib/pg_eventstore/queries/partition_queries.rb +45 -103
  94. data/lib/pg_eventstore/queries/replica_queries.rb +110 -0
  95. data/lib/pg_eventstore/queries/streams_global_index_queries.rb +163 -0
  96. data/lib/pg_eventstore/queries/transaction_queries.rb +52 -10
  97. data/lib/pg_eventstore/queries.rb +29 -1
  98. data/lib/pg_eventstore/query_builders/basic_filtering.rb +38 -5
  99. data/lib/pg_eventstore/query_builders/event_markers_filtering.rb +47 -0
  100. data/lib/pg_eventstore/query_builders/event_markers_index_filtering.rb +275 -0
  101. data/lib/pg_eventstore/query_builders/event_subscription_positions_filtering.rb +37 -0
  102. data/lib/pg_eventstore/query_builders/events_filtering.rb +15 -164
  103. data/lib/pg_eventstore/query_builders/events_global_index_filtering.rb +227 -0
  104. data/lib/pg_eventstore/query_builders/filters/collection.rb +324 -0
  105. data/lib/pg_eventstore/query_builders/filters/event_type_filter.rb +37 -0
  106. data/lib/pg_eventstore/query_builders/filters/filter_row.rb +54 -0
  107. data/lib/pg_eventstore/query_builders/filters/marker_filter.rb +20 -0
  108. data/lib/pg_eventstore/query_builders/filters/marker_filter_row.rb +49 -0
  109. data/lib/pg_eventstore/query_builders/filters/stream_filter.rb +48 -0
  110. data/lib/pg_eventstore/query_builders/index_based_events_filtering.rb +260 -0
  111. data/lib/pg_eventstore/query_builders/partitions_filtering.rb +175 -51
  112. data/lib/pg_eventstore/query_builders/read_cursor/stream_cursor.rb +122 -0
  113. data/lib/pg_eventstore/query_builders/streams_global_index_filtering.rb +83 -0
  114. data/lib/pg_eventstore/query_builders/subscription_events_filtering.rb +79 -0
  115. data/lib/pg_eventstore/query_strategy/async.rb +64 -0
  116. data/lib/pg_eventstore/query_strategy/foreground.rb +25 -0
  117. data/lib/pg_eventstore/query_strategy.rb +19 -0
  118. data/lib/pg_eventstore/raw_event.rb +46 -0
  119. data/lib/pg_eventstore/rspec/test_helpers.rb +21 -8
  120. data/lib/pg_eventstore/sql_builder.rb +87 -8
  121. data/lib/pg_eventstore/stream.rb +13 -16
  122. data/lib/pg_eventstore/stream_global_index.rb +28 -0
  123. data/lib/pg_eventstore/subscriptions/callback_handlers/events_processor_handlers.rb +5 -17
  124. data/lib/pg_eventstore/subscriptions/callback_handlers/events_subscription_position_worker_handlers.rb +36 -0
  125. data/lib/pg_eventstore/subscriptions/callback_handlers/subscription_feeder_handlers.rb +12 -0
  126. data/lib/pg_eventstore/subscriptions/callback_handlers/subscription_runner_handlers.rb +21 -7
  127. data/lib/pg_eventstore/subscriptions/events_processor.rb +20 -18
  128. data/lib/pg_eventstore/subscriptions/events_processor_consumer/multiple.rb +63 -0
  129. data/lib/pg_eventstore/subscriptions/events_processor_consumer/replica.rb +68 -0
  130. data/lib/pg_eventstore/subscriptions/events_processor_consumer/single.rb +62 -0
  131. data/lib/pg_eventstore/subscriptions/events_processor_consumer.rb +44 -0
  132. data/lib/pg_eventstore/subscriptions/events_subscription_position_worker.rb +68 -0
  133. data/lib/pg_eventstore/subscriptions/queries/event_subscription_position_queries.rb +177 -0
  134. data/lib/pg_eventstore/subscriptions/queries/subscription_queries.rb +78 -54
  135. data/lib/pg_eventstore/subscriptions/replica_subscription_handler.rb +140 -0
  136. data/lib/pg_eventstore/subscriptions/replica_subscription_runner.rb +9 -0
  137. data/lib/pg_eventstore/subscriptions/subscription.rb +2 -1
  138. data/lib/pg_eventstore/subscriptions/subscription_feed_strategies/collection.rb +36 -0
  139. data/lib/pg_eventstore/subscriptions/subscription_feed_strategies/index_read_strategy.rb +82 -0
  140. data/lib/pg_eventstore/subscriptions/subscription_feed_strategies/replication_strategy.rb +75 -0
  141. data/lib/pg_eventstore/subscriptions/subscription_feed_strategy.rb +31 -0
  142. data/lib/pg_eventstore/subscriptions/subscription_feeder.rb +24 -0
  143. data/lib/pg_eventstore/subscriptions/subscription_handler_performance.rb +4 -2
  144. data/lib/pg_eventstore/subscriptions/subscription_runner.rb +20 -9
  145. data/lib/pg_eventstore/subscriptions/subscription_runner_commands/reset_position.rb +1 -1
  146. data/lib/pg_eventstore/subscriptions/subscription_runners_feeder.rb +9 -18
  147. data/lib/pg_eventstore/subscriptions/subscriptions_lifecycle.rb +0 -12
  148. data/lib/pg_eventstore/subscriptions/subscriptions_manager.rb +74 -14
  149. data/lib/pg_eventstore/{subscriptions/synchronized_array.rb → synchronized_array.rb} +15 -0
  150. data/lib/pg_eventstore/tasks/setup.rake +2 -2
  151. data/lib/pg_eventstore/utils.rb +31 -0
  152. data/lib/pg_eventstore/version.rb +1 -1
  153. data/lib/pg_eventstore/web/application.rb +100 -16
  154. data/lib/pg_eventstore/web/paginator/base_collection.rb +5 -1
  155. data/lib/pg_eventstore/web/paginator/event_types_collection.rb +14 -4
  156. data/lib/pg_eventstore/web/paginator/events_collection.rb +29 -33
  157. data/lib/pg_eventstore/web/paginator/helpers.rb +16 -9
  158. data/lib/pg_eventstore/web/paginator/markers_collection.rb +48 -0
  159. data/lib/pg_eventstore/web/paginator/stream_contexts_collection.rb +13 -2
  160. data/lib/pg_eventstore/web/paginator/stream_ids_collection.rb +21 -11
  161. data/lib/pg_eventstore/web/paginator/stream_names_collection.rb +18 -4
  162. data/lib/pg_eventstore/web/paginator/streams_collection.rb +95 -0
  163. data/lib/pg_eventstore/web/public/javascripts/pg_eventstore.js +49 -22
  164. data/lib/pg_eventstore/web/subscriptions/set_collection.rb +1 -1
  165. data/lib/pg_eventstore/web/subscriptions/subscriptions.rb +1 -1
  166. data/lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb +1 -1
  167. data/lib/pg_eventstore/web/subscriptions/with_state/subscriptions.rb +1 -1
  168. data/lib/pg_eventstore/web/views/home/dashboard.erb +11 -9
  169. data/lib/pg_eventstore/web/views/home/partials/event_filter.erb +18 -5
  170. data/lib/pg_eventstore/web/views/home/partials/events.erb +38 -1
  171. data/lib/pg_eventstore/web/views/home/partials/markers_filter.erb +18 -0
  172. data/lib/pg_eventstore/web/views/layouts/application.erb +6 -0
  173. data/lib/pg_eventstore/web/views/streams/index.erb +110 -0
  174. data/lib/pg_eventstore/web/views/streams/partials/streams.erb +11 -0
  175. data/lib/pg_eventstore/web/views/subscriptions/index.erb +4 -1
  176. data/lib/pg_eventstore/web.rb +2 -0
  177. data/lib/pg_eventstore.rb +23 -60
  178. data/pg_eventstore.gemspec +6 -4
  179. data/sig/interfaces/_raw_events_handler.rbs +3 -0
  180. data/sig/interfaces/subscription_handler.rbs +1 -1
  181. data/sig/pg/result.rbs +9 -0
  182. data/sig/pg_eventstore/async_runner.rbs +13 -0
  183. data/sig/pg_eventstore/basic_config.rbs +9 -0
  184. data/sig/pg_eventstore/chunks/chunk.rbs +13 -0
  185. data/sig/pg_eventstore/chunks/read_api_events_index_chunk.rbs +30 -0
  186. data/sig/pg_eventstore/chunks/replica_events_index_chunk.rbs +11 -0
  187. data/sig/pg_eventstore/chunks/repository.rbs +22 -0
  188. data/sig/pg_eventstore/chunks/subscription_checkpoint_chunk.rbs +18 -0
  189. data/sig/pg_eventstore/chunks/subscription_events_index_chunk.rbs +37 -0
  190. data/sig/pg_eventstore/client.rbs +40 -42
  191. data/sig/pg_eventstore/commands/append.rbs +11 -25
  192. data/sig/pg_eventstore/commands/event_modifiers/prepare_link_event.rbs +9 -12
  193. data/sig/pg_eventstore/commands/event_modifiers/prepare_regular_event.rbs +5 -4
  194. data/sig/pg_eventstore/commands/link_to.rbs +6 -11
  195. data/sig/pg_eventstore/commands/read.rbs +2 -5
  196. data/sig/pg_eventstore/commands/read_grouped.rbs +7 -0
  197. data/sig/pg_eventstore/commands/read_streams.rbs +7 -0
  198. data/sig/pg_eventstore/commands/read_streams_paginated.rbs +16 -0
  199. data/sig/pg_eventstore/commands/regular_stream_read_paginated.rbs +9 -17
  200. data/sig/pg_eventstore/commands/revision_check/current_revision.rbs +25 -0
  201. data/sig/pg_eventstore/commands/revision_check/event_type_revisions_comparison.rbs +14 -0
  202. data/sig/pg_eventstore/commands/revision_check/expected_revision.rbs +67 -0
  203. data/sig/pg_eventstore/commands/revision_check/stream_revision_check.rbs +20 -0
  204. data/sig/pg_eventstore/commands/revision_check/stream_revision_comparison.rbs +9 -0
  205. data/sig/pg_eventstore/commands/stream_revision.rbs +7 -0
  206. data/sig/pg_eventstore/commands/system_stream_read_paginated.rbs +9 -14
  207. data/sig/pg_eventstore/config.rbs +15 -6
  208. data/sig/pg_eventstore/connection.rbs +11 -18
  209. data/sig/pg_eventstore/errors.rbs +64 -34
  210. data/sig/pg_eventstore/event.rbs +16 -2
  211. data/sig/pg_eventstore/event_deserializer.rbs +5 -10
  212. data/sig/pg_eventstore/event_global_index.rbs +60 -0
  213. data/sig/pg_eventstore/event_marker.rbs +9 -0
  214. data/sig/pg_eventstore/event_marker_index.rbs +12 -0
  215. data/sig/pg_eventstore/extensions/acts_as_configurable.rbs +29 -0
  216. data/sig/pg_eventstore/extensions/options_defaults.rbs +7 -0
  217. data/sig/pg_eventstore/feature_marker.rbs +10 -0
  218. data/sig/pg_eventstore/maintenance.rbs +12 -8
  219. data/sig/pg_eventstore/middleware/event_trace.rbs +14 -0
  220. data/sig/pg_eventstore/partition.rbs +2 -4
  221. data/sig/pg_eventstore/pg_connection.rbs +8 -0
  222. data/sig/pg_eventstore/queries/event_marker_queries.rbs +21 -0
  223. data/sig/pg_eventstore/queries/event_queries.rbs +4 -36
  224. data/sig/pg_eventstore/queries/events_global_index_queries.rbs +37 -0
  225. data/sig/pg_eventstore/queries/index_filtering_queries.rbs +50 -0
  226. data/sig/pg_eventstore/queries/links_resolver.rbs +5 -9
  227. data/sig/pg_eventstore/queries/maintenance_queries.rbs +12 -9
  228. data/sig/pg_eventstore/queries/partition_queries.rbs +32 -67
  229. data/sig/pg_eventstore/queries/replica_queries.rbs +31 -0
  230. data/sig/pg_eventstore/queries/streams_global_index_queries.rbs +39 -0
  231. data/sig/pg_eventstore/queries/transaction_queries.rbs +2 -0
  232. data/sig/pg_eventstore/queries.rbs +11 -21
  233. data/sig/pg_eventstore/query_builders/basic_filtering.rbs +10 -3
  234. data/sig/pg_eventstore/query_builders/event_markers_filtering.rbs +17 -0
  235. data/sig/pg_eventstore/query_builders/event_markers_index_filtering.rbs +69 -0
  236. data/sig/pg_eventstore/query_builders/event_subscription_positions_filtering.rbs +15 -0
  237. data/sig/pg_eventstore/query_builders/events_filtering_query.rbs +9 -51
  238. data/sig/pg_eventstore/query_builders/events_global_index_filtering.rbs +68 -0
  239. data/sig/pg_eventstore/query_builders/filters/collection.rbs +84 -0
  240. data/sig/pg_eventstore/query_builders/filters/event_type_filter.rbs +19 -0
  241. data/sig/pg_eventstore/query_builders/filters/filter_row.rbs +21 -0
  242. data/sig/pg_eventstore/query_builders/filters/marker_filter.rbs +13 -0
  243. data/sig/pg_eventstore/query_builders/filters/marker_filter_row.rbs +19 -0
  244. data/sig/pg_eventstore/query_builders/filters/stream_filter.rbs +24 -0
  245. data/sig/pg_eventstore/query_builders/index_based_events_filtering.rbs +60 -0
  246. data/sig/pg_eventstore/query_builders/partitions_filtering.rbs +29 -10
  247. data/sig/pg_eventstore/query_builders/read_cursor/stream_cursor.rbs +47 -0
  248. data/sig/pg_eventstore/query_builders/streams_global_index_filtering.rbs +27 -0
  249. data/sig/pg_eventstore/query_builders/subscription_events_filtering.rbs +26 -0
  250. data/sig/pg_eventstore/query_strategy/async.rbs +17 -0
  251. data/sig/pg_eventstore/query_strategy/foreground.rbs +11 -0
  252. data/sig/pg_eventstore/query_strategy.rbs +7 -0
  253. data/sig/pg_eventstore/raw_event.rbs +20 -0
  254. data/sig/pg_eventstore/sql_builder.rbs +32 -10
  255. data/sig/pg_eventstore/stream.rbs +10 -18
  256. data/sig/pg_eventstore/stream_global_index.rbs +14 -0
  257. data/sig/pg_eventstore/subscriptions/callback_handlers/events_processor_handlers.rbs +5 -4
  258. data/sig/pg_eventstore/subscriptions/callback_handlers/events_subscription_position_worker_handlers.rbs +9 -0
  259. data/sig/pg_eventstore/subscriptions/callback_handlers/subscription_feeder_handlers.rbs +17 -12
  260. data/sig/pg_eventstore/subscriptions/callback_handlers/subscription_runner_handlers.rbs +17 -6
  261. data/sig/pg_eventstore/subscriptions/event_subscription_position_queries.rbs +30 -0
  262. data/sig/pg_eventstore/subscriptions/events_processor.rbs +12 -5
  263. data/sig/pg_eventstore/subscriptions/events_processor_consumer/multiple.rbs +17 -0
  264. data/sig/pg_eventstore/subscriptions/events_processor_consumer/replica.rbs +17 -0
  265. data/sig/pg_eventstore/subscriptions/events_processor_consumer/single.rbs +17 -0
  266. data/sig/pg_eventstore/subscriptions/events_processor_consumer.rbs +14 -0
  267. data/sig/pg_eventstore/subscriptions/events_subscription_position_worker.rbs +28 -0
  268. data/sig/pg_eventstore/subscriptions/queries/subscription_queries.rbs +7 -39
  269. data/sig/pg_eventstore/subscriptions/replica_subscription_handler.rbs +33 -0
  270. data/sig/pg_eventstore/subscriptions/replica_subscription_runner.rbs +4 -0
  271. data/sig/pg_eventstore/subscriptions/subscription_feed_strategy/collection.rbs +14 -0
  272. data/sig/pg_eventstore/subscriptions/subscription_feed_strategy/index_read_strategy.rbs +23 -0
  273. data/sig/pg_eventstore/subscriptions/subscription_feed_strategy/replication_strategy.rbs +23 -0
  274. data/sig/pg_eventstore/subscriptions/subscription_feed_strategy.rbs +11 -0
  275. data/sig/pg_eventstore/subscriptions/subscription_feeder.rbs +13 -10
  276. data/sig/pg_eventstore/subscriptions/subscription_handler_performance.rbs +1 -1
  277. data/sig/pg_eventstore/subscriptions/subscription_runner.rbs +13 -2
  278. data/sig/pg_eventstore/subscriptions/subscription_runners_feeder.rbs +1 -8
  279. data/sig/pg_eventstore/subscriptions/subscriptions_lifecycle.rbs +4 -6
  280. data/sig/pg_eventstore/subscriptions/subscriptions_manager.rbs +29 -43
  281. data/sig/pg_eventstore/synchronized_array.rbs +4 -0
  282. data/sig/pg_eventstore/utils.rbs +10 -11
  283. data/sig/pg_eventstore/web/application.rbs +13 -3
  284. data/sig/pg_eventstore/web/paginator/base_collection.rbs +2 -0
  285. data/sig/pg_eventstore/web/paginator/event_types_collection.rbs +4 -0
  286. data/sig/pg_eventstore/web/paginator/events_collection.rbs +11 -11
  287. data/sig/pg_eventstore/web/paginator/helpers.rbs +6 -15
  288. data/sig/pg_eventstore/web/paginator/markers_collection.rbs +13 -0
  289. data/sig/pg_eventstore/web/paginator/stream_contexts_collection.rbs +4 -0
  290. data/sig/pg_eventstore/web/paginator/stream_names_collection.rbs +4 -0
  291. data/sig/pg_eventstore/web/paginator/streams_collection.rbs +30 -0
  292. data/sig/pg_eventstore.rbs +8 -26
  293. metadata +175 -20
  294. data/Dockerfile +0 -3
  295. data/lib/pg_eventstore/commands/all_stream_read_grouped.rb +0 -69
  296. data/lib/pg_eventstore/commands/regular_stream_read_grouped.rb +0 -31
  297. data/lib/pg_eventstore/subscriptions/queries/subscription_service_queries.rb +0 -78
  298. data/lib/pg_eventstore/web/views/home/partials/system_stream_filter.erb +0 -15
  299. data/sig/pg_eventstore/commands/all_stream_read_grouped.rbs +0 -16
  300. data/sig/pg_eventstore/commands/regular_stream_read_grouped.rbs +0 -8
  301. data/sig/pg_eventstore/subscriptions/queries/subscription_service_queries.rbs +0 -19
  302. data/sig/pg_eventstore/subscriptions/synchronized_array.rbs +0 -4
  303. /data/sig/interfaces/{_raw_event_handler.rbs → raw_event_handler.rbs} +0 -0
@@ -2,28 +2,33 @@ module PgEventstore
2
2
  class SubscriptionFeederHandlers
3
3
  include Extensions::CallbackHandlersExtension
4
4
 
5
- def self.update_subscriptions_set_state: (PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle, String state) -> void
5
+ def self.start_events_subscription_position_worker: (EventsSubscriptionPositionWorker worker) -> void
6
6
 
7
- def self.lock_subscriptions: (PgEventstore::SubscriptionsLifecycle subscriptions_lifecycle) -> void
7
+ def self.stop_events_subscription_position_worker: (EventsSubscriptionPositionWorker worker) -> void
8
8
 
9
- def self.start_runners: (PgEventstore::SubscriptionsLifecycle subscriptions_lifecycle) -> void
9
+ def self.update_subscriptions_set_state: (SubscriptionsSetLifecycle subscriptions_set_lifecycle,
10
+ String state) -> void
10
11
 
11
- def self.start_cmds_handler: (PgEventstore::CommandsHandler cmds_handler) -> void
12
+ def self.lock_subscriptions: (SubscriptionsLifecycle subscriptions_lifecycle) -> void
12
13
 
13
- def self.persist_error_info: (PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle, StandardError error) -> void
14
+ def self.start_runners: (SubscriptionsLifecycle subscriptions_lifecycle) -> void
14
15
 
15
- def self.ping_subscriptions_set: (PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
16
+ def self.start_cmds_handler: (CommandsHandler cmds_handler) -> void
16
17
 
17
- def self.feed_runners: (PgEventstore::SubscriptionsLifecycle subscriptions_lifecycle, Symbol config_name) -> void
18
+ def self.persist_error_info: (SubscriptionsSetLifecycle subscriptions_set_lifecycle, StandardError error) -> void
18
19
 
19
- def self.ping_subscriptions: (PgEventstore::SubscriptionsLifecycle subscriptions_lifecycle) -> void
20
+ def self.ping_subscriptions_set: (SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
20
21
 
21
- def self.stop_runners: (PgEventstore::SubscriptionsLifecycle subscriptions_lifecycle) -> void
22
+ def self.feed_runners: (SubscriptionsLifecycle subscriptions_lifecycle, Symbol config_name) -> void
22
23
 
23
- def self.reset_subscriptions_set: (PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
24
+ def self.ping_subscriptions: (SubscriptionsLifecycle subscriptions_lifecycle) -> void
24
25
 
25
- def self.stop_commands_handler: (PgEventstore::CommandsHandler cmds_handler) -> void
26
+ def self.stop_runners: (SubscriptionsLifecycle subscriptions_lifecycle) -> void
26
27
 
27
- def self.update_subscriptions_set_restarts: (PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
28
+ def self.reset_subscriptions_set: (SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
29
+
30
+ def self.stop_commands_handler: (CommandsHandler cmds_handler) -> void
31
+
32
+ def self.update_subscriptions_set_restarts: (SubscriptionsSetLifecycle subscriptions_set_lifecycle) -> void
28
33
  end
29
34
  end
@@ -1,15 +1,26 @@
1
1
  module PgEventstore
2
2
  class SubscriptionRunnerHandlers
3
- def self.track_exec_time: (PgEventstore::SubscriptionHandlerPerformance stats, ^() -> void, Integer _current_position) -> void
3
+ def self.checkpoint: (Subscription subscription, Integer global_position) -> void
4
4
 
5
- def self.update_subscription_stats: (PgEventstore::Subscription subscription, PgEventstore::SubscriptionHandlerPerformance stats, Integer current_position) -> void
5
+ def self.track_exec_time: (
6
+ SubscriptionHandlerPerformance stats, ^() -> void,
7
+ Integer _current_position,
8
+ Integer events_number
9
+ ) -> void
6
10
 
7
- def self.update_subscription_error: (PgEventstore::Subscription subscription, PgEventstore::WrappedException error) -> void
11
+ def self.update_subscription_stats: (
12
+ Subscription subscription,
13
+ SubscriptionHandlerPerformance stats,
14
+ Integer current_position,
15
+ Integer events_number
16
+ ) -> void
8
17
 
9
- def self.update_subscription_chunk_stats: (PgEventstore::Subscription subscription, Integer global_position) -> void
18
+ def self.update_subscription_error: (Subscription subscription, WrappedException error) -> void
10
19
 
11
- def self.update_subscription_restarts: (PgEventstore::Subscription subscription) -> void
20
+ def self.update_subscription_chunk_stats: (Subscription subscription, Integer subscription_position) -> void
12
21
 
13
- def self.update_subscription_state: (PgEventstore::Subscription subscription, String state) -> void
22
+ def self.update_subscription_restarts: (Subscription subscription) -> void
23
+
24
+ def self.update_subscription_state: (Subscription subscription, String state) -> void
14
25
  end
15
26
  end
@@ -0,0 +1,30 @@
1
+ module PgEventstore
2
+ class EventSubscriptionPositionQueries
3
+ ASSIGN_SUBSCRIPTION_POSITIONS_LOCK_ID: Integer
4
+ MAX_INDEX_RECORDS_TO_UPDATE_SUBSCRIPTION_POSITION: Integer
5
+ REINDEX_PERIOD: Integer
6
+ UNPROCESSED_POSITIONS_INDEX_NAME: String
7
+ UNPROCESSED_POSITIONS_INDEX_SIZE_THRESHOLD: Integer
8
+ UNPROCESSED_POSITIONS_LOCK_EXPIRES_IN: Integer
9
+
10
+ attr_reader connection: Connection
11
+
12
+ def initialize: (Connection connection) -> void
13
+
14
+ def create_unprocessed_positions: (Array[Hash[String, untyped]] raw_events) -> void
15
+
16
+ def max_subscription_position: -> Integer?
17
+
18
+ def reindex_unprocessed_positions: -> Time?
19
+
20
+ def subscription_positions_from_db: (Array[Event] events) -> Hash[Integer, Integer?]
21
+
22
+ def assign_subscription_position: -> Integer?
23
+
24
+ private
25
+
26
+ def index_size: (String index_name) -> Integer
27
+
28
+ def transaction_queries: -> TransactionQueries
29
+ end
30
+ end
@@ -1,19 +1,26 @@
1
1
  module PgEventstore
2
2
  class EventsProcessor
3
- include PgEventstore::Extensions::CallbacksExtension
3
+ include Extensions::CallbacksExtension
4
+
4
5
  extend Forwardable
5
6
 
7
+ @basic_runner: BasicRunner
8
+ @consumer: EventsProcessorConsumer
9
+ @events_repository: Chunks::Repository
10
+ @repository_cond: MonitorMixin::ConditionVariable
11
+
6
12
  %a{rbs:test:skip} def initialize: (
7
- _RawEventHandler handler,
8
13
  graceful_shutdown_timeout: Float | Integer,
14
+ consumer: EventsProcessorConsumer,
15
+ ?events_repository: Chunks::Repository,
9
16
  ?recovery_strategies: Array[RunnerRecoveryStrategy]
10
17
  ) -> void
11
18
 
12
- def feed: (::Array[::Hash[untyped, untyped]] raw_events) -> void
19
+ def feed: (Chunks::Chunk[EventGlobalIndex, Hash[String, untyped]] chunk) -> void
13
20
 
14
- def events_left_in_chunk: () -> Integer
21
+ def events_left_in_repo: () -> Integer
15
22
 
16
- def clear_chunk: () -> void
23
+ def clear_events_repository: () -> void
17
24
 
18
25
  def process_event: (::Hash[untyped, untyped] raw_event) -> void
19
26
 
@@ -0,0 +1,17 @@
1
+ module PgEventstore
2
+ module EventsProcessorConsumer
3
+ class Multiple
4
+ EVENTS_WAIT_TIMEOUT: Integer | Float
5
+
6
+ include EventsProcessorConsumer
7
+ extend ClassMethods
8
+
9
+ @handler: _RawEventsHandler
10
+
11
+ @last_unprocessed_events: Array[Hash[String, untyped]]?
12
+
13
+ def initialize: (_RawEventsHandler handler) -> void
14
+ end
15
+ end
16
+ end
17
+
@@ -0,0 +1,17 @@
1
+ module PgEventstore
2
+ module EventsProcessorConsumer
3
+ class Replica
4
+ include EventsProcessorConsumer
5
+
6
+ EVENTS_WAIT_TIMEOUT: Float | Integer
7
+
8
+ @handler: Proc
9
+
10
+ @last_unprocessed_events: Array[EventGlobalIndex::SubscriptionRepr]?
11
+
12
+ def self.create_consumer: (Symbol config_name, Symbol replica_config_name) -> Replica
13
+
14
+ def initialize: (Proc handler) -> void
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ module PgEventstore
2
+ module EventsProcessorConsumer
3
+ class Single
4
+ EVENT_WAIT_TIMEOUT: Float | Integer
5
+
6
+ include EventsProcessorConsumer
7
+ extend ClassMethods
8
+
9
+ @handler: _RawEventHandler
10
+
11
+ @last_unprocessed_event: Hash[String, untyped]?
12
+
13
+ def initialize: (_RawEventHandler handler) -> void
14
+ end
15
+ end
16
+ end
17
+
@@ -0,0 +1,14 @@
1
+ module PgEventstore
2
+ module EventsProcessorConsumer
3
+ module ClassMethods
4
+ def create_consumer: (_SubscriptionHandler handler, EventDeserializer deserializer) -> EventsProcessorConsumer
5
+ end
6
+
7
+ def self.consumer_class: (bool in_batches) -> Class
8
+
9
+ def call: (Callbacks callbacks, Chunks::Repository repository,
10
+ MonitorMixin::ConditionVariable repository_cond) -> void
11
+
12
+ def clear_unprocessed_events: -> void
13
+ end
14
+ end
@@ -0,0 +1,28 @@
1
+ module PgEventstore
2
+ class EventsSubscriptionPositionWorker
3
+ class ReindexTime
4
+ include Extensions::OptionsExtension
5
+ include Extensions::OptionsDefaults
6
+
7
+ attr_accessor time: Time?
8
+ end
9
+
10
+ @basic_runner: BasicRunner
11
+
12
+ @next_reindex_at: ReindexTime
13
+
14
+ attr_reader config_name: Symbol
15
+
16
+ def initialize: (Symbol config_name) -> void
17
+
18
+ private
19
+
20
+ def attach_runner_callbacks: -> void
21
+
22
+ def config: -> Config
23
+
24
+ def connection: -> Connection
25
+
26
+ def event_subscription_position_queries: -> EventSubscriptionPositionQueries
27
+ end
28
+ end
@@ -1,73 +1,41 @@
1
1
  module PgEventstore
2
2
  class SubscriptionQueries
3
- # _@param_ `connection`
4
- def initialize: (PgEventstore::Connection connection) -> void
3
+ @query_strategy: QueryStrategy
4
+
5
+ attr_accessor connection: Connection
6
+
7
+ def initialize: (Connection connection, QueryStrategy query_strategy) -> void
8
+
9
+ def create_or_replace_table_function: (Integer id, Hash[untyped, untyped] options, Integer locked_by) -> void
5
10
 
6
- # _@param_ `attrs`
7
11
  def find_or_create_by: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]
8
12
 
9
- # _@param_ `attrs`
10
13
  def find_by: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]?
11
14
 
12
- # _@param_ `attrs`
13
15
  def find_all: (::Hash[untyped, untyped] attrs) -> ::Array[::Hash[Symbol, untyped]]
14
16
 
15
17
  def set_collection: (?String? state) -> ::Array[String]
16
18
 
17
- # _@param_ `id`
18
19
  def find!: (Integer id) -> ::Hash[Symbol, untyped]
19
20
 
20
- # _@param_ `attrs`
21
21
  def create: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]
22
22
 
23
- # _@param_ `id`
24
- #
25
- # _@param_ `attrs`
26
- #
27
- # _@param_ `locked_by`
28
23
  def update: (Integer id, attrs: ::Hash[Symbol, untyped], locked_by: Integer?) -> ::Hash[Symbol, untyped]
29
24
 
30
- # _@param_ `subscriptions_set_id` — SubscriptionsSet#id
31
- #
32
- # _@param_ `subscriptions_ids` — Array of Subscription#id
33
25
  def ping_all: (Integer subscriptions_set_id, ::Array[Integer] subscriptions_ids) -> ::Hash[Integer, Time]
34
26
 
35
- # _@param_ `query_options` — runner_id/query options association
36
- #
37
- # _@return_ — runner_id/events association
38
- def subscriptions_events: (::Hash[Integer, ::Hash[untyped, untyped]] query_options) -> ::Hash[Integer, Array[::Hash[untyped, untyped]]]
39
-
40
- # _@param_ `id` — subscription's id
41
- #
42
- # _@param_ `lock_id` — id of the subscriptions set which reserves the subscription
43
- #
44
- # _@param_ `force` — whether to lock the subscription despite on #locked_by value
45
- #
46
- # _@return_ — lock id
47
27
  def lock!: (Integer id, Integer lock_id, ?force: bool) -> Integer
48
28
 
49
- # _@param_ `id`
50
29
  def delete: (Integer id) -> void
51
30
 
52
- # _@param_ `id` — runner id
53
- #
54
- # _@param_ `options` — query options
55
- def query_builder: (Integer id, ::Hash[untyped, untyped] options) -> SQLBuilder
56
-
57
- # _@param_ `builders`
58
31
  def union_builders: (::Array[SQLBuilder] builders) -> SQLBuilder
59
32
 
60
33
  def transaction_queries: () -> TransactionQueries
61
34
 
62
35
  def links_resolver: () -> LinksResolver
63
36
 
64
- # _@param_ `hash`
65
37
  def deserialize: (::Hash[String, untyped] hash) -> ::Hash[Symbol, untyped]
66
38
 
67
- # _@param_ `attrs`
68
39
  def find_by_attrs_builder: (::Hash[untyped, untyped] attrs) -> SQLBuilder
69
-
70
- # Returns the value of attribute connection.
71
- attr_accessor connection: Connection
72
40
  end
73
41
  end
@@ -0,0 +1,33 @@
1
+ module PgEventstore
2
+ class ReplicaSubscriptionHandler
3
+ @replica_config_name: Symbol
4
+ @config_name: Symbol
5
+
6
+ def call: (Array[EventGlobalIndex::SubscriptionRepr] indexes) -> void
7
+
8
+ def initialize: (Symbol, Symbol) -> void
9
+
10
+ private
11
+
12
+ def connection: -> Connection
13
+
14
+ def destination_replica_queries: -> ReplicaQueries
15
+
16
+ def records_to_sql: (
17
+ String table_name,
18
+ Array[Symbol] attribute_names,
19
+ Array[Hash[Symbol, untyped]] attributes_collection,
20
+ ?on_conflict: String?
21
+ ) -> String
22
+
23
+ def reject_already_processed: (
24
+ Array[EventGlobalIndex::SubscriptionRepr] indexes
25
+ ) -> Array[EventGlobalIndex::SubscriptionRepr]
26
+
27
+ def replica_connection: -> Connection
28
+
29
+ def replica_transaction_queries: -> TransactionQueries
30
+
31
+ def source_replica_queries: -> ReplicaQueries
32
+ end
33
+ end
@@ -0,0 +1,4 @@
1
+ module PgEventstore
2
+ class ReplicaSubscriptionRunner < SubscriptionRunner
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ module PgEventstore
2
+ module SubscriptionFeedStrategy[unchecked Runner]
3
+ class Collection < Array[SubscriptionFeedStrategy[SubscriptionRunner] | SubscriptionFeedStrategy[ReplicaSubscriptionRunner]]
4
+ DEFAULT_SUBSCRIPTIONS_NUM_PER_QUERY: Integer
5
+
6
+ def self.create: (
7
+ Array[SubscriptionRunner | ReplicaSubscriptionRunner] runners,
8
+ Connection connection,
9
+ QueryStrategy query_strategy,
10
+ ?subscriptions_per_query: Integer
11
+ ) -> Collection
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ module PgEventstore
2
+ module SubscriptionFeedStrategy[unchecked Runner]
3
+ class IndexReadStrategy
4
+ include SubscriptionFeedStrategy[SubscriptionRunner]
5
+
6
+ INDEX_LOOK_UP_DISTANCE: Integer
7
+
8
+ @connection: Connection
9
+ @query_strategy: QueryStrategy
10
+ @runners: Array[SubscriptionRunner]
11
+
12
+ def initialize: (Connection connection, QueryStrategy query_strategy) -> void
13
+
14
+ private
15
+
16
+ def event_subscription_position_queries: -> EventSubscriptionPositionQueries
17
+
18
+ def events_global_index_queries: -> EventsGlobalIndexQueries
19
+
20
+ def safe_position: -> Integer
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ module PgEventstore
2
+ module SubscriptionFeedStrategy[unchecked Runner]
3
+ class ReplicationStrategy
4
+ include SubscriptionFeedStrategy[ReplicaSubscriptionRunner]
5
+
6
+ INDEX_LOOK_UP_DISTANCE: Integer
7
+
8
+ @connection: Connection
9
+ @query_strategy: QueryStrategy
10
+ @runners: Array[ReplicaSubscriptionRunner]
11
+
12
+ def initialize: (Connection connection, QueryStrategy query_strategy) -> void
13
+
14
+ private
15
+
16
+ def event_subscription_position_queries: -> EventSubscriptionPositionQueries
17
+
18
+ def events_global_index_queries: -> EventsGlobalIndexQueries
19
+
20
+ def safe_position: -> Integer
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,11 @@
1
+ module PgEventstore
2
+ module SubscriptionFeedStrategy[unchecked Runner]
3
+ def add: (*Runner runners) -> Array[Runner]
4
+
5
+ def any?: -> bool
6
+
7
+ def feed: -> void
8
+
9
+ def size: -> Integer
10
+ end
11
+ end
@@ -4,26 +4,27 @@ module PgEventstore
4
4
 
5
5
  extend Forwardable
6
6
 
7
- @basic_runner: PgEventstore::BasicRunner
8
- @commands_handler: PgEventstore::CommandsHandler
9
- @subscriptions_lifecycle: PgEventstore::SubscriptionsLifecycle
10
- @subscriptions_set_lifecycle: PgEventstore::SubscriptionsSetLifecycle
7
+ @basic_runner: BasicRunner
8
+ @commands_handler: CommandsHandler
9
+ @events_subscription_position_worker: EventsSubscriptionPositionWorker?
10
+ @subscriptions_lifecycle: SubscriptionsLifecycle
11
+ @subscriptions_set_lifecycle: SubscriptionsSetLifecycle
11
12
 
12
13
  attr_reader config_name: Symbol
13
14
 
14
15
  def initialize: (
15
16
  config_name: Symbol,
16
- subscriptions_set_lifecycle: PgEventstore::SubscriptionsSetLifecycle,
17
- subscriptions_lifecycle: PgEventstore::SubscriptionsLifecycle
17
+ subscriptions_set_lifecycle: SubscriptionsSetLifecycle,
18
+ subscriptions_lifecycle: SubscriptionsLifecycle
18
19
  ) -> void
19
20
 
20
- def id: () -> Integer?
21
+ def id: -> Integer?
21
22
 
22
- def start_all: () -> void
23
+ def start_all: -> void
23
24
 
24
- def stop_all: () -> void
25
+ def stop_all: -> void
25
26
 
26
- def attach_runner_callbacks: () -> void
27
+ def attach_runner_callbacks: -> void
27
28
 
28
29
  private
29
30
 
@@ -31,5 +32,7 @@ module PgEventstore
31
32
  Symbol config_name,
32
33
  SubscriptionsSetLifecycle subscriptions_set_lifecycle
33
34
  ) -> Array[RunnerRecoveryStrategy]
35
+
36
+ def requires_subscription_position_assignment?: -> bool
34
37
  end
35
38
  end
@@ -5,7 +5,7 @@ module PgEventstore
5
5
 
6
6
  def initialize: () -> void
7
7
 
8
- def track_exec_time: () { () -> untyped } -> untyped
8
+ def track_exec_time: (Integer events_number) { () -> untyped } -> untyped
9
9
 
10
10
  def average_event_processing_time: () -> Float
11
11
  end
@@ -1,9 +1,14 @@
1
1
  module PgEventstore
2
2
  class SubscriptionRunner
3
3
  extend Forwardable
4
- MAX_EVENTS_PER_CHUNK: Integer
4
+ DEFAULT_MAX_EVENTS_PER_CHUNK: Integer
5
5
  MIN_EVENTS_PER_CHUNK: Integer
6
- INITIAL_EVENTS_PER_CHUNK: Integer
6
+ DEFAULT_INITIAL_EVENTS_PER_CHUNK: Integer
7
+
8
+ @events_processor: EventsProcessor
9
+ @initial_events_per_chunk: Integer
10
+ @max_events_per_chunk: Integer
11
+ @stats: SubscriptionHandlerPerformance
7
12
 
8
13
  # Returns the value of attribute subscription.
9
14
  attr_reader subscription: Subscription
@@ -12,6 +17,8 @@ module PgEventstore
12
17
  stats: SubscriptionHandlerPerformance,
13
18
  events_processor: EventsProcessor,
14
19
  subscription: Subscription,
20
+ ?initial_events_per_chunk: Integer,
21
+ ?max_events_per_chunk: Integer,
15
22
  ) -> void
16
23
 
17
24
  def next_chunk_query_opts: () -> ::Hash[untyped, untyped]
@@ -23,5 +30,9 @@ module PgEventstore
23
30
  def estimate_events_number: () -> Integer
24
31
 
25
32
  def attach_callbacks: () -> void
33
+
34
+ private
35
+
36
+ def subscription_from_position: -> Integer
26
37
  end
27
38
  end
@@ -1,20 +1,13 @@
1
1
  module PgEventstore
2
2
  class SubscriptionRunnersFeeder
3
3
  @config_name: Symbol
4
- @current_database_id: Integer
5
4
 
6
- # _@param_ `config_name`
7
5
  def initialize: (Symbol config_name) -> void
8
6
 
9
- # _@param_ `runners`
10
7
  def feed: (::Array[SubscriptionRunner] runners) -> void
11
8
 
12
9
  private
13
10
 
14
- def connection: () -> Connection
15
-
16
- def subscription_queries: () -> SubscriptionQueries
17
-
18
- def subscription_service_queries: -> SubscriptionServiceQueries
11
+ def connection: -> Connection
19
12
  end
20
13
  end
@@ -4,15 +4,15 @@ module PgEventstore
4
4
 
5
5
  @config_name: Symbol
6
6
 
7
- @subscriptions_set_lifecycle: PgEventstore::SubscriptionsSetLifecycle
7
+ @subscriptions_set_lifecycle: SubscriptionsSetLifecycle
8
8
 
9
9
  @subscriptions_pinged_at: Time
10
10
 
11
11
  @force_lock: bool
12
12
 
13
- attr_reader runners: Array[PgEventstore::SubscriptionRunner]
13
+ attr_reader runners: Array[SubscriptionRunner]
14
14
 
15
- def initialize: (Symbol config_name, PgEventstore::SubscriptionsSetLifecycle subscriptions_set_lifecycle, ?force_lock: bool)-> void
15
+ def initialize: (Symbol config_name, SubscriptionsSetLifecycle subscriptions_set_lifecycle, ?force_lock: bool)-> void
16
16
 
17
17
  def force_locked?: -> bool
18
18
 
@@ -20,8 +20,6 @@ module PgEventstore
20
20
 
21
21
  def ping_subscriptions: -> void
22
22
 
23
- def subscriptions: -> Array[PgEventstore::Subscription]
24
-
25
- def force_lock!: -> void
23
+ def subscriptions: -> Array[Subscription]
26
24
  end
27
25
  end