Class: OpenC3::EphemeralStore

Inherits:
Store show all
Defined in:
lib/openc3/utilities/store_autoload.rb

Instance Attribute Summary

Attributes inherited from Store

#redis_pool, #redis_url

Instance Method Summary collapse

Methods inherited from Store

#build_redis, #get_last_offset, #get_newest_message, #get_oldest_message, instance, method_missing, #method_missing, #read_topics, #trim_topic, #update_topic_offsets, #write_topic

Constructor Details

#initialize(pool_size = 10) ⇒ EphemeralStore

Returns a new instance of EphemeralStore.



243
244
245
246
247
# File 'lib/openc3/utilities/store_autoload.rb', line 243

def initialize(pool_size = 10)
  super(pool_size)
  @redis_url = "redis://#{ENV['OPENC3_REDIS_EPHEMERAL_HOSTNAME']}:#{ENV['OPENC3_REDIS_EPHEMERAL_PORT']}"
  @redis_pool = StoreConnectionPool.new(size: pool_size) { build_redis() }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenC3::Store