Class: Synapse::Auditing::CorrelationDataProvider
- Inherits:
-
AuditDataProvider
- Object
- AuditDataProvider
- Synapse::Auditing::CorrelationDataProvider
- Defined in:
- lib/synapse/auditing/correlation_data_provider.rb
Overview
Implementation of an audit provider that attaches a command’s identifier to each event produced as a result of the execution of that command
Constant Summary collapse
- DEFAULT_CORRELATION_KEY =
Key that will be used by default
:command_id
Instance Method Summary collapse
- #initialize(correlation_key = DEFAULT_CORRELATION_KEY) ⇒ undefined constructor
- #provide_data_for(command) ⇒ Hash
Constructor Details
#initialize(correlation_key = DEFAULT_CORRELATION_KEY) ⇒ undefined
11 12 13 |
# File 'lib/synapse/auditing/correlation_data_provider.rb', line 11 def initialize(correlation_key = DEFAULT_CORRELATION_KEY) @correlation_key = correlation_key end |
Instance Method Details
#provide_data_for(command) ⇒ Hash
17 18 19 |
# File 'lib/synapse/auditing/correlation_data_provider.rb', line 17 def provide_data_for(command) Hash[@correlation_key, command.id] end |