Class: EventSourcery::Postgres::Config
- Inherits:
-
Object
- Object
- EventSourcery::Postgres::Config
- Defined in:
- lib/event_sourcery/postgres/config.rb
Overview
Configuration settings for the PostgreSQL event store and projections.
Instance Attribute Summary collapse
-
#aggregates_table_name ⇒ Object
Returns the value of attribute aggregates_table_name.
-
#auto_create_projector_tracker ⇒ Object
Returns the value of attribute auto_create_projector_tracker.
-
#callback_interval_if_no_new_events ⇒ Object
Returns the value of attribute callback_interval_if_no_new_events.
- #event_sink ⇒ Object
- #event_source ⇒ Object
- #event_store ⇒ Object
-
#event_store_database ⇒ Object
Returns the value of attribute event_store_database.
-
#event_tracker ⇒ Object
Returns the value of attribute event_tracker.
-
#events_table_name ⇒ Object
Returns the value of attribute events_table_name.
-
#lock_table_to_guarantee_linear_sequence_id_growth ⇒ Object
Returns the value of attribute lock_table_to_guarantee_linear_sequence_id_growth.
-
#on_events_recorded ⇒ Object
Returns the value of attribute on_events_recorded.
-
#projections_database ⇒ Object
Returns the value of attribute projections_database.
-
#projector_transaction_size ⇒ Object
Returns the value of attribute projector_transaction_size.
-
#tracker_table_name ⇒ Object
Returns the value of attribute tracker_table_name.
-
#write_events_function_name ⇒ Object
Returns the value of attribute write_events_function_name.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/event_sourcery/postgres/config.rb', line 25 def initialize @lock_table_to_guarantee_linear_sequence_id_growth = true @write_events_function_name = 'writeEvents' @events_table_name = :events @aggregates_table_name = :aggregates @tracker_table_name = :projector_tracker @callback_interval_if_no_new_events = 10 @event_store_database = nil @auto_create_projector_tracker = true @projector_transaction_size = 1 @on_events_recorded = ->(events) {} end |
Instance Attribute Details
#aggregates_table_name ⇒ Object
Returns the value of attribute aggregates_table_name.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def aggregates_table_name @aggregates_table_name end |
#auto_create_projector_tracker ⇒ Object
Returns the value of attribute auto_create_projector_tracker.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def auto_create_projector_tracker @auto_create_projector_tracker end |
#callback_interval_if_no_new_events ⇒ Object
Returns the value of attribute callback_interval_if_no_new_events.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def callback_interval_if_no_new_events @callback_interval_if_no_new_events end |
#event_sink ⇒ Object
46 47 48 |
# File 'lib/event_sourcery/postgres/config.rb', line 46 def event_sink @event_sink ||= ::EventSourcery::EventStore::EventSink.new(event_store) end |
#event_source ⇒ Object
42 43 44 |
# File 'lib/event_sourcery/postgres/config.rb', line 42 def event_source @event_source ||= ::EventSourcery::EventStore::EventSource.new(event_store) end |
#event_store ⇒ Object
38 39 40 |
# File 'lib/event_sourcery/postgres/config.rb', line 38 def event_store @event_store ||= EventStore.new(event_store_database) end |
#event_store_database ⇒ Object
Returns the value of attribute event_store_database.
22 23 24 |
# File 'lib/event_sourcery/postgres/config.rb', line 22 def event_store_database @event_store_database end |
#event_tracker ⇒ Object
Returns the value of attribute event_tracker.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def event_tracker @event_tracker end |
#events_table_name ⇒ Object
Returns the value of attribute events_table_name.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def events_table_name @events_table_name end |
#lock_table_to_guarantee_linear_sequence_id_growth ⇒ Object
Returns the value of attribute lock_table_to_guarantee_linear_sequence_id_growth.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def lock_table_to_guarantee_linear_sequence_id_growth @lock_table_to_guarantee_linear_sequence_id_growth end |
#on_events_recorded ⇒ Object
Returns the value of attribute on_events_recorded.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def on_events_recorded @on_events_recorded end |
#projections_database ⇒ Object
Returns the value of attribute projections_database.
22 23 24 |
# File 'lib/event_sourcery/postgres/config.rb', line 22 def projections_database @projections_database end |
#projector_transaction_size ⇒ Object
Returns the value of attribute projector_transaction_size.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def projector_transaction_size @projector_transaction_size end |
#tracker_table_name ⇒ Object
Returns the value of attribute tracker_table_name.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def tracker_table_name @tracker_table_name end |
#write_events_function_name ⇒ Object
Returns the value of attribute write_events_function_name.
7 8 9 |
# File 'lib/event_sourcery/postgres/config.rb', line 7 def write_events_function_name @write_events_function_name end |