Sha256: e06ca704611e4c896e2c877af396e28e2ee644b0680afa39a778a3d959015554

Contents?: true

Size: 357 Bytes

Versions: 3

Compression:

Stored size: 357 Bytes

Contents

module OnsOnRails
  module Publishers
    class Tcp
      def initialize(options)
        @client = Ons::Producer.new(options.fetch(:access_key), options.fetch(:secret_key), options.fetch(:producer_id))
        @client.start
      end

      def publish(topic, tag, body, key)
        @client.send_message(topic, tag, body, key)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ons_on_rails-1.0.2 lib/ons_on_rails/publishers/tcp.rb
ons_on_rails-1.0.1 lib/ons_on_rails/publishers/tcp.rb
ons_on_rails-1.0.0 lib/ons_on_rails/publishers/tcp.rb