Sha256: 4e8f424131e27573cb00654f8b3b46f342403c878e468c7889ef0077d1f0372e

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

module Pheme
  class TopicPublisher
    attr_accessor :topic_arn

    def initialize(topic_arn:)
      @topic_arn = topic_arn
    end

    def publish_events
      raise NotImplementedError
    end

    def publish(message)
      Pheme.log(:info, "Publishing to #{topic_arn}: #{message}")
      Pheme.configuration.sns_client.publish(topic_arn: topic_arn, message: message.to_json)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pheme-0.0.2 lib/pheme/topic_publisher.rb
pheme-0.0.1 lib/pheme/topic_publisher.rb