Sha256: aff328a4b0b70f65c2e68291758361f2b9c1224f7d42150306c4321194c8933e

Contents?: true

Size: 516 Bytes

Versions: 8

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

require "kiev/config"
require "kiev/subrequest_helper"

module Kiev
  module AwsSns
    class ContextInjector
      # @param [Hash] message_attributes Injects context headers
      # @return [Hash]
      def call(message_attributes = {})
        Kiev::SubrequestHelper.payload.each do |key, value|
          message_attributes[key] = {
            data_type: "String",
            string_value: value.to_s
          }
        end
        message_attributes
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kiev-4.9.0 lib/kiev/aws_sns/context_injector.rb
kiev-4.8.3 lib/kiev/aws_sns/context_injector.rb
kiev-4.8.2 lib/kiev/aws_sns/context_injector.rb
kiev-4.8.1 lib/kiev/aws_sns/context_injector.rb
kiev-4.8.0 lib/kiev/aws_sns/context_injector.rb
kiev-4.7.0 lib/kiev/aws_sns/context_injector.rb
kiev-4.6.0 lib/kiev/aws_sns/context_injector.rb
kiev-4.5.0 lib/kiev/aws_sns/context_injector.rb