Sha256: 3aa430b7a76d5a3ed071d2d4438d95b5ef9f8450ec103d4301ca6626aa504857
Contents?: true
Size: 570 Bytes
Versions: 48
Compression:
Stored size: 570 Bytes
Contents
require 'beefcake' require 'kurchatov/riemann/event' # monkey patch module Beefcake::Message def initialize(attrs={}) attrs ||= {} fields.values.each do |fld| self[fld.name] = attrs[fld.name] end end end 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
48 entries across 48 versions & 1 rubygems