Class: InstantRecord::Configuration
- Inherits:
-
Object
- Object
- InstantRecord::Configuration
- Defined in:
- lib/instant_record/configuration.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Where the authoritative Rails app's sync engine is mounted.
-
#sync_interval ⇒ Object
Base delay, in seconds, for retrying an outbox drain that did not get through.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 |
# File 'lib/instant_record/configuration.rb', line 14 def initialize @endpoint = DEFAULT_MOUNT_PATH @sync_interval = 3 end |
Instance Attribute Details
#endpoint ⇒ Object
Where the authoritative Rails app's sync engine is mounted. Same-origin relative path by default; set an absolute URL for cross-origin dev setups (e.g. Vite on :5173 talking to Rails on :3000).
6 7 8 |
# File 'lib/instant_record/configuration.rb', line 6 def endpoint @endpoint end |
#sync_interval ⇒ Object
Base delay, in seconds, for retrying an outbox drain that did not get through. It is not a poll cadence: the browser has no heartbeat, because writes trigger their own sync pass and the change stream carries everything inbound. A client with an empty outbox makes no requests at all.
12 13 14 |
# File 'lib/instant_record/configuration.rb', line 12 def sync_interval @sync_interval end |