Class: Necropsy::Analyzers::Dynamic::RedisPayloadLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/necropsy/analyzers/dynamic/coverband_importer.rb

Constant Summary collapse

DEFAULT_PATTERN =
'coverband*'
DEFAULT_CONNECT_TIMEOUT =
5.0
DEFAULT_READ_TIMEOUT =
5.0

Instance Method Summary collapse

Constructor Details

#initialize(source:, config:) ⇒ RedisPayloadLoader

Returns a new instance of RedisPayloadLoader.



155
156
157
158
159
# File 'lib/necropsy/analyzers/dynamic/coverband_importer.rb', line 155

def initialize(source:, config:)
  @uri = URI(source)
  @config = config
  @socket = nil
end

Instance Method Details

#loadObject



161
162
163
164
165
166
167
168
# File 'lib/necropsy/analyzers/dynamic/coverband_importer.rb', line 161

def load
  connect
  authenticate
  select_database
  merge_payloads(keys.filter_map { |key| payload_for_key(key) })
ensure
  socket&.close
end