Class: Apidepth::RegistryLoader
- Inherits:
-
Object
- Object
- Apidepth::RegistryLoader
- Defined in:
- lib/apidepth/registry_loader.rb
Constant Summary collapse
- REGISTRY_URL =
"https://collector.apidepth.io/v1/registry".freeze
Class Method Summary collapse
-
.load_and_start ⇒ Object
Called by the Railtie after_initialize.
Class Method Details
.load_and_start ⇒ Object
Called by the Railtie after_initialize. Loads the best available registry (remote → disk cache → bundled baseline already loaded by VendorRegistry.initialize_registry) and starts the background refresh thread.
15 16 17 18 19 |
# File 'lib/apidepth/registry_loader.rb', line 15 def self.load_and_start registry = fetch_remote || load_from_disk VendorRegistry.replace(registry) if registry start_refresh_thread end |