Class: Necropsy::Analyzers::Dynamic::RedisPayloadLoader
- Inherits:
-
Object
- Object
- Necropsy::Analyzers::Dynamic::RedisPayloadLoader
- Defined in:
- lib/necropsy/analyzers/dynamic/redis_payload_loader.rb
Constant Summary collapse
- DEFAULT_PATTERN =
'coverband*'
Instance Method Summary collapse
-
#initialize(source:, config:) ⇒ RedisPayloadLoader
constructor
A new instance of RedisPayloadLoader.
- #load ⇒ Object
Constructor Details
#initialize(source:, config:) ⇒ RedisPayloadLoader
Returns a new instance of RedisPayloadLoader.
17 18 19 20 21 22 |
# File 'lib/necropsy/analyzers/dynamic/redis_payload_loader.rb', line 17 def initialize(source:, config:) @redactor = RedisCredentialRedactor.new(source) @uri = parse_uri(source) @config = config @limits = RedisInputLimits.new(config) end |
Instance Method Details
#load ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/necropsy/analyzers/dynamic/redis_payload_loader.rb', line 24 def load start_session transport.connect authenticate select_database payload_processor.merge(keys.filter_map { |key| payload_for_key(key) }) rescue RedisCommandError, Error => e raise Error, redactor.redact(e.), cause: nil rescue StandardError => e raise Error, redactor.redact("Could not load Redis coverage: #{e.}"), cause: nil ensure transport&.close end |