Sha256: 9d74744de017fe823e9ac84e8ba0ef9dfcf001475ab76fcc3c2cf4156cfa5d2c

Contents?: true

Size: 396 Bytes

Versions: 3

Compression:

Stored size: 396 Bytes

Contents

require 'beefcake'
require 'kurchatov/riemann/event'

module Kurchatov
  module Riemann
    class Message
      include Beefcake::Message

      optional :ok, :bool, 2
      optional :error, :string, 3
      repeated :events, Event, 6

      def encode_with_length
        buffer = ''
        encoded = encode buffer
        "#{[encoded.length].pack('N')}#{encoded}"
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kurchatov-0.0.6.pre.2 lib/kurchatov/riemann/message.rb
kurchatov-0.0.6.pre.1 lib/kurchatov/riemann/message.rb
kurchatov-0.0.5 lib/kurchatov/riemann/message.rb