class Synapse::Auditing::CorrelationDataProvider
Implementation of an audit provider that attaches a command's identifier to each event produced as a result of the execution of that command
Constants
- DEFAULT_CORRELATION_KEY
Key that will be used by default
Public Class Methods
new(correlation_key = DEFAULT_CORRELATION_KEY)
click to toggle source
@param [Symbol] correlation_key @return [undefined]
# File lib/synapse/auditing/correlation_data_provider.rb, line 11 def initialize(correlation_key = DEFAULT_CORRELATION_KEY) @correlation_key = correlation_key end
Public Instance Methods
provide_data_for(command)
click to toggle source
@param [CommandMessage] command @return [Hash]
# File lib/synapse/auditing/correlation_data_provider.rb, line 17 def provide_data_for(command) Hash[@correlation_key, command.id] end