Sha256: 872df73f6c50f5692d3023e891d1b57a758c590e9b9dfc1f9fa32c225b466a3d
Contents?: true
Size: 937 Bytes
Versions: 4
Compression:
Stored size: 937 Bytes
Contents
require 'test/unit' require 'pathname' $LOAD_PATH.unshift("./lib") $LOAD_PATH.unshift("./lib/fluent/plugin/thrift") require 'thrift' require 'flume_constants' require 'flume_types' require 'thrift_flume_event_server' #socket = Thrift::Socket.new 'localhost', 56789, 3000 #transport = Thrift::Socket.new 'localhost', 56789, 3000 #transport = Thrift::FramedTransport.new(Thrift::Socket.new('localhost', 56789, 3000)) transport = Thrift::BufferedTransport.new(Thrift::Socket.new('localhost', 56789, 3000)) #protocol = Thrift::BinaryProtocol.new transport, false, false protocol = Thrift::BinaryProtocol.new(transport) client = ThriftFlumeEventServer::Client.new(protocol) transport.open [1, 2].each { |elm| message = 'muganishizawa' priority = Priority::INFO entry = ThriftFlumeEvent.new(:body => message, :priority => priority, :timestamp => (Time.now.to_i * 1000)) #entry = ThriftFlumeEvent.new client.append entry } transport.close
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-flume-1.0.0.rc1 | sample_client.rb |
fluent-plugin-flume-0.2.0 | sample_client.rb |
fluent-plugin-flume-0.1.3 | sample_client.rb |
fluent-plugin-flume-0.1.2 | sample_client.rb |